feat 完善注释

This commit is contained in:
Ironsp
2026-10-01 17:24:57 +08:00
parent 2b59f68fd7
commit 9f4a5c7cda
183 changed files with 485 additions and 3615 deletions

View File

@@ -13,12 +13,10 @@ const emit = defineEmits<{
share: [id: string]
}>()
/** 空值兜底(后端 customerType / industry 等可能不下发) */
function dash(value: string): string {
return value || '--'
}
/** 概览信息(设计稿:标签 + 全角冒号 + 值,单行铺开) */
const meta = computed(() => [
{ label: '客户类型', value: dash(props.item.clientType) },
{ label: '所属行业', value: dash(props.item.industry) },
@@ -126,7 +124,6 @@ const meta = computed(() => [
}
&__meta {
// 显式 stretch:否则元信息行会被居中收缩(设计稿为左起铺满整行)
.flex(column, flex-start, stretch);
flex: 1;
gap: @spacing-sm;

View File

@@ -9,22 +9,14 @@ interface Props {
const props = defineProps<Props>()
/** 业务类型标签(设计稿:蓝色实心胶囊 + 白字) */
const tag = computed(() => formatBusinessType(props.item.category))
/**
* 封面图。
*
* <p>toCase 已把「非可访问地址」收口成空串,无封面时回退主题色底,
* 避免裂图或空白块。</p>
*/
const coverStyle = computed(() =>
props.item.cover ? { backgroundImage: `url(${props.item.cover})` } : undefined,
)
</script>
<template>
<!-- 设计稿:封面通栏(不随内容容器收窄、无圆角),左下叠类型标签 + 案例名 -->
<section class="case-hero" :style="coverStyle">
<div class="container case-hero__inner">
<span v-if="tag" class="case-hero__tag">{{ tag }}</span>
@@ -49,7 +41,6 @@ const coverStyle = computed(() =>
content: '';
position: absolute;
inset: 0;
// 底部压暗,保证白字可读
background: linear-gradient(180deg, rgba(15, 23, 42, 0) 42%, rgba(15, 23, 42, 0.55));
}
@@ -76,7 +67,6 @@ const coverStyle = computed(() =>
font-size: @font-size-xxl;
font-weight: 600;
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
// 最多两行,避免超长案例名撑破 hero
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;

View File

@@ -7,13 +7,6 @@ interface Props {
const props = defineProps<Props>()
/**
* 案例正文区块(设计稿:一段一张白卡,卡片标题带蓝色竖条)。
*
* <p>区块的**数量与标题都来自后端**(vm_project_case_catalog:title + content,
* 按 sort_order 升序),前端不再写死「项目背景 / 客户痛点 / 需求描述 / 交付物」,
* 后端增删目录即自动生效。空内容已在 utils/caseVo.ts#toSections 里过滤。</p>
*/
</script>
<template>
@@ -26,7 +19,6 @@ const props = defineProps<Props>()
<h3 v-if="section.title" class="case-rich__title">
{{ section.title }}
</h3>
<!-- 后端下发富文本 HTML(可能内嵌 img / video),直接渲染 -->
<div class="case-rich__html" v-html="section.content" />
</section>
</div>
@@ -34,7 +26,6 @@ const props = defineProps<Props>()
<style lang="less" scoped>
.case-rich {
// 同 detail.vue:显式 stretch,避免正文块被压成内容宽
.flex(column, flex-start, stretch);
gap: @spacing-base;
@@ -70,8 +61,6 @@ const props = defineProps<Props>()
:deep(p) {
margin-bottom: @spacing-sm;
// 后端富文本常把「1、…2、…」分条内容放在同一个 <p> 里用 \r\n 分行,
// 默认会被 HTML 折叠成一段,故保留换行(与旧纯文本分支的 pre-wrap 行为一致)
white-space: pre-wrap;
}

View File

@@ -7,15 +7,10 @@ import type { BusinessIndustryOption, CaseQuery, CaseTypeOption, ScaleLimit } fr
interface Props {
query: CaseQuery
/** 业务类型选项(接口下发:/categories 的统计;value=提报 id,label=类型名) */
typeOptions: CaseTypeOption[]
/** 所属行业选项(接口下发:/categories) */
industryOptions: BusinessIndustryOption[]
/** 项目规模选项(接口下发:/categories,label 已由后端拼好) */
scaleOptions: ScaleLimit[]
/** 案例总数(全量口径,用于业务类型「全部」行角标) */
caseTotal: number
/** 待提交条件的结果数(「确定筛选(N 个结果)」) */
previewTotal: number
}
@@ -29,7 +24,6 @@ const emit = defineEmits<{
type TimeShortcut = 'all' | '3m' | '6m' | '1y' | 'custom'
/** 完成时间后端未下发选项,保留前端快捷区间 */
const timeShortcuts: Array<{ label: string; value: Exclude<TimeShortcut, 'custom'>; months: number }> = [
{ label: '全部', value: 'all', months: 0 },
{ label: '近3个月', value: '3m', months: 3 },
@@ -37,12 +31,6 @@ const timeShortcuts: Array<{ label: string; value: Exclude<TimeShortcut, 'custom
{ label: '近一年', value: '1y', months: 12 },
]
/**
* 规模档位的稳定标识。
*
* <p>后端档位是「上下限」对象(label 只是展示文字),用上下限拼 key 比 label 可靠:
* 区间值唯一、且不依赖后端文案。</p>
*/
function scaleKey(item: ScaleLimit): string {
return `${item.lowerLimit ?? ''}-${item.upperLimit ?? ''}`
}
@@ -51,7 +39,6 @@ function scaleLabel(item: ScaleLimit): string {
return item.label ?? `${item.lowerLimit ?? 0}-${item.upperLimit ?? '不限'}万`
}
/** 快捷区间 → 具体日期区间 */
function rangeOf(months: number): [string, string] {
const end = new Date()
const start = new Date()
@@ -59,7 +46,6 @@ function rangeOf(months: number): [string, string] {
return [formatDate(start, 'YYYY-MM-DD'), formatDate(end, 'YYYY-MM-DD')]
}
/** 当前区间命中的快捷项(用于选中态回显,避免额外维护一份状态) */
const activeShortcut = computed<TimeShortcut>(() => {
const range = props.query.dateRange
if (!range) return 'all'
@@ -160,7 +146,6 @@ function clearChips(): void {
</button>
</div>
<!-- 业务类型(接口下发;带案例数) -->
<section class="case-filter__group">
<h3 class="case-filter__group-title">
业务类型
@@ -191,7 +176,6 @@ function clearChips(): void {
</ul>
</section>
<!-- 所属行业(接口下发,多选) -->
<section class="case-filter__group">
<h3 class="case-filter__group-title">
所属行业
@@ -216,7 +200,6 @@ function clearChips(): void {
</div>
</section>
<!-- 项目规模(接口下发,多选) -->
<section class="case-filter__group">
<h3 class="case-filter__group-title">
项目规模
@@ -241,7 +224,6 @@ function clearChips(): void {
</div>
</section>
<!-- 完成时间(快捷区间 + 自定义;后端未下发该组选项) -->
<section class="case-filter__group">
<h3 class="case-filter__group-title">
完成时间
@@ -271,7 +253,6 @@ function clearChips(): void {
</div>
</section>
<!-- 已选条件 -->
<section class="case-filter__selected">
<div class="case-filter__selected-head">
<span class="case-filter__selected-title">已选条件({{ chips.length }}个)</span>
@@ -309,7 +290,6 @@ function clearChips(): void {
<style lang="less" scoped>
.case-filter {
flex-shrink: 0;
// 设计稿筛选面板 矩形 148286 @(70,272) 516×1461 白底
width: 516px;
padding: 15px 0 40px;
border-radius: @radius-base;
@@ -318,7 +298,6 @@ function clearChips(): void {
&__head,
&__group,
&__actions {
// 设计稿内容左 x105 → 卡内 x35;行右 x536 → 卡内右 50
padding: 0 50px 0 35px;
}
@@ -327,7 +306,6 @@ function clearChips(): void {
}
&__title {
// 设计 @(105,287) 28/500 #222222
font-size: 28px;
font-weight: 500;
line-height: 41px;
@@ -347,20 +325,17 @@ function clearChips(): void {
margin-top: 24px;
}
// 标题 → 第一组(设计 287+41=328 → 业务类型标题 339)
&__head + &__group {
margin-top: 11px;
}
&__group-title {
// 设计 @(105,339) 24/500 #333333
font-size: 24px;
font-weight: 500;
line-height: 35px;
color: @cases-text;
}
/* 业务类型:整行可点(设计行高 50,文案 20/400) */
&__rows {
margin-top: 19px;
}
@@ -419,7 +394,6 @@ function clearChips(): void {
}
&__row-count {
// 设计计数 16/500 #666666
color: @cases-muted;
font-size: 16px;
font-weight: 500;
@@ -430,7 +404,6 @@ function clearChips(): void {
font-weight: inherit;
}
/* 胶囊选项(两列;设计胶囊高 53、行距 24、列距 33) */
&__pills {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -506,7 +479,6 @@ function clearChips(): void {
}
}
/* 已选条件 */
&__selected {
margin: 23px 50px 0 35px;
padding: 16px 24px 21px;
@@ -552,7 +524,6 @@ function clearChips(): void {
}
}
/* 底部操作 */
&__actions {
.flex(row, flex-start, center);
gap: 13px;

View File

@@ -4,7 +4,6 @@ import type { Case } from '@/types/business/cases'
interface Props {
cases: Case[]
/** 当前筛选条件下的案例总数 */
total: number
}
@@ -41,13 +40,11 @@ const emit = defineEmits<{
<style lang="less" scoped>
.cases-grid {
&__total {
// 设计计数 20px / 700 / #121212
font-size: 20px;
font-weight: 700;
color: @heading-color;
}
// 设计卡片 396×267,列 x606/1030/1454 → 列距 28,行 y423/713 → 行距 23
&__list {
display: grid;
grid-template-columns: repeat(3, 1fr);

View File

@@ -3,7 +3,6 @@ import { computed } from 'vue'
interface Props {
keyword: string
/** 是否只看收藏 */
favoriteOnly: boolean
}
@@ -60,7 +59,6 @@ const keyword = computed<string>({
<style lang="less" scoped>
.case-search {
.flex(row, flex-start, center);
// 设计稿搜索卡 矩形 148317 @(606,272) 1244×128;输入框 @(642,312) 592×49
gap: 24px;
height: 128px;
box-sizing: border-box;
@@ -70,7 +68,6 @@ const keyword = computed<string>({
&__field {
position: relative;
// 设计输入框 592 宽
flex: 0 0 592px;
}
@@ -100,7 +97,6 @@ const keyword = computed<string>({
transition: border-color 0.2s;
&::placeholder {
// 设计 placeholder @(660,322) 20/400 #999999
color: @text-color-disabled;
}
@@ -110,7 +106,6 @@ const keyword = computed<string>({
}
&__btn {
// 设计按钮文字 20/400 #FFFFFF,白底蓝字按钮宽 100
min-width: 100px;
height: 49px;
padding: 0 @spacing-base;

View File

@@ -2,7 +2,6 @@
import { computed, onMounted, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { useRoute, useRouter } from 'vue-router'
// 页面容器:数据只经 store,不直接 import api
import { useCasesStore } from '@/stores/modules/cases'
import CaseHero from './cpns/CaseHero.vue'
import CaseDetailHeader from './cpns/CaseDetailHeader.vue'
@@ -52,14 +51,12 @@ onMounted(load)
</div>
<template v-if="item">
<!-- 封面通栏:设计稿中不被内容容器收窄 -->
<CaseHero :item="item" />
<div class="container case-detail__main">
<CaseDetailHeader :item="item" @favorite="onFavorite" @share="onShare" />
<CaseRichText :item="item" />
<!-- 设计稿:内容区整宽蓝色按钮 -->
<button
class="case-detail__cta"
type="button"
@@ -86,8 +83,6 @@ onMounted(load)
font-size: @font-size-base;
}
// ⚠️ .flex 第三个参数是 align(默认 center),必须显式传 stretch,
// 否则各白块会被压成「内容宽 + 水平居中」(设计稿要求整宽)
&__main {
.flex(column, flex-start, stretch);
gap: @spacing-base;

View File

@@ -4,7 +4,6 @@ import { onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
import { PaginationBar } from '@/components'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useCasesStore } from '@/stores/modules/cases'
import type { CaseQuery } from '@/types/business/cases'
import CasesFilter from './cpns/CasesFilter.vue'
@@ -49,7 +48,6 @@ function onViewDetail(id: string): void {
}
onMounted(() => {
// 筛选面板选项全部来自接口:业务类型 / 所属行业 / 项目规模三组都走 /categories,完成时间由前端算
void Promise.all([casesStore.fetchCategories(), casesStore.fetchCases()])
})
</script>
@@ -112,43 +110,39 @@ onMounted(() => {
<style lang="less" scoped>
.cases {
// 设计实测:页脚顶 y1811,正文最底约 y1733 → 底距 78
padding-bottom: 78px;
// 设计稿页头条 矩形 148284 @(0,73) 1920×179 白底通栏;文案左缩进 112
&__hero {
height: 179px;
box-sizing: border-box;
padding-top: 32px; // 标题 @(112,105) → 73+32
padding-top: 32px;
background: @white;
}
// 页头文案与内容区不对齐:设计实测文案在 x112(内容区 x70 + 42)
&__hero-inner {
padding-left: 42px;
}
&__title {
margin: 0;
font-size: 36px; // 设计 @(112,105) 36/700 #121212
font-size: 36px;
font-weight: 700;
line-height: 52px;
color: @cases-hero-title;
}
&__slogan {
margin: 15px 0 0; // 副标题 @(112,172),标题底 105+52=157 → 间距 15
font-size: 24px; // 设计 24/500 #666666
margin: 15px 0 0;
font-size: 24px;
font-weight: 500;
line-height: 37px;
color: @cases-muted;
}
// 设计稿:筛选面板 @(70,272) 516 宽,卡片区 @(606,423) 起 1244 宽,主区间距 20
&__body {
.flex(row, flex-start, flex-start);
gap: 20px;
padding-top: 20px; // 筛选面板顶 272 − 页头条底(73+179) = 20
padding-top: 20px;
}
&__main {

View File

@@ -25,7 +25,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
<template>
<div class="contract-info">
<!-- 区块 01:合同信息(相对卡顶 y36) -->
<h3 class="contract-info__section contract-info__section--1">
<span class="contract-info__step">01</span>
<span class="contract-info__section-title">合同信息</span>
@@ -59,7 +58,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
<StatusTag :label="contract.signStatus" :variant="SIGN_VARIANTS[contract.signStatus]" />
</div>
<!-- 区块 02:关联项目(相对卡顶 y649) -->
<h3 class="contract-info__section contract-info__section--2">
<span class="contract-info__step">02</span>
<span class="contract-info__section-title">关联项目</span>
@@ -76,7 +74,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
<span class="contract-info__value">{{ contract.projectNo }}</span>
</div>
<!-- 区块 03:合同文件(相对卡顶 y901) -->
<h3 class="contract-info__section contract-info__section--3">
<span class="contract-info__step">03</span>
<span class="contract-info__section-title">合同文件</span>
@@ -110,26 +107,18 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
</template>
<style lang="less" scoped>
// 合同详情信息区(设计 e6c3a361,1920 画布 1:1 绝对定位)
// 白卡 (70,152) 1780×1152;卡内三行「步骤区」相对卡顶:
// 区块 01 合同信息 y36(步骤号 ink 188、区块名 211)、首标签 283、值框 326
// 区块 02 关联项目 y649(步骤号 801、区块名 824)、首标签 901、值框 944
// 区块 03 合同文件 y901(步骤号 1053、区块名 1076)、文件行 1153
// 值框 764×49 @x134/1010(卡内左 64 / 940),描边 #999999、圆角 8、底 #F4F6F8
// 行距 122(标签 283 → 405 → 527 → 649);列间距 112(776 → 940 = 164 − 764)
.contract-info {
position: relative;
width: 1780px;
height: 1152px;
margin-top: 21px; // 面包屑盒底 131(72+32+27)→ 卡顶 152
margin-top: 21px;
border-radius: @radius-lg;
background: @white;
box-sizing: border-box;
// 区块(步骤号 + 区块名)—— 绝对定位,四个区块
&__section {
position: absolute;
left: 43px; // 步骤号 x124 = 70 + 43(123)→ 区块行内相对 11 → 113 ✓
left: 43px;
top: 0;
height: 0;
@@ -140,7 +129,7 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
&__section-title {
position: absolute;
left: 60px; // 区块名 ink x184 = 卡内 114 = 行 left 43 + 60
left: 60px;
margin: 0;
font-size: 28px;
font-weight: 500;
@@ -148,8 +137,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
color: @contract-cell-text;
}
// 步骤号 01/02/03:48/500 #024FFF。absolute 定到区块名左侧 ——
// 区块行 left 43,区块名 ink 相对行左 60(= 184 − 124);步骤号 ink 落 0
&__step {
position: absolute;
left: 0;
@@ -162,30 +149,24 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
transform: translateY(-50%);
}
// 字段(标签 + 值框)—— 绝对定位到卡面,行间距 122
&__field {
.flex(column, flex-start, stretch);
position: absolute;
width: 764px;
gap: 14px; // 标签盒底 312 → 值框顶 326
gap: 14px;
}
// 值框顶(相对卡顶 = 设计 y − 152):326/448/570/692/944
&__field--1 { top: 174px; }
&__field--2 { top: 296px; }
&__field--3 { top: 418px; }
&__field--4 { top: 540px; }
&__field--5 { top: 770px; } // 标签 901 − 109(label 行盒 29 + gap 14 = 43 补偿)
&__field--5 { top: 770px; }
// 第 5 行(关联项目)标签需落设计 y901 → 卡内 749,而 --5 槽位顶 770 是给
// 「合同状态」这类值框直排的字段用的;带标签的行统一再抬 21
&__field--5:has(&__label) { top: 749px; }
// 左右列:值框 x134 / x1010 → 卡内左 64 / 940
&__field--l { left: 64px; }
&__field--r { left: 940px; }
// 标签 20/500 #333
&__label {
font-size: 20px;
font-weight: 500;
@@ -193,7 +174,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
color: @contract-cell-text;
}
// 值框:764×49、#F4F6F8 底、1px #999999、圆角 8;文字内缩 18
&__value {
.flex(row, flex-start, center);
width: 100%;
@@ -209,7 +189,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
.ellipsis();
}
// 合同状态(StatusTag)同样入值框,去彩色胶囊
&__field :deep(.status-tag) {
.flex(row, flex-start, center);
width: 100%;
@@ -240,7 +219,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
font-size: 16px;
}
// ── 合同文件:通栏 1640×90 @(124,1153),底 #EDEDED ──
&__files {
.flex(column, flex-start, stretch);
position: absolute;

View File

@@ -23,11 +23,10 @@ const emit = defineEmits<{ refresh: [] }>()
</template>
<style lang="less" scoped>
// 签署卡(设计 39:白底圆角卡、二维码直接置于卡面、右侧四步指引)
.sign-panel {
.flex(row, flex-start, flex-start);
gap: 48px; // 二维码区 → 步骤区(设计 63 × 0.77)
padding: 28px 32px; // 卡内边距(设计 37/40 × 0.77)
gap: 48px;
padding: 28px 32px;
border-radius: @radius-lg;
background: @white;

View File

@@ -83,7 +83,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
overflow-x: auto;
.scrollbar();
// 表格本体(设计 31ee32fc:1654×740,外框 1px #999、灰表头 64、行高 97、无竖线)
&__grid {
width: 100%;
border: 1px solid @contract-line;
@@ -100,7 +99,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
font-size: 20px;
}
// 长名称列按设计稿换行显示(设计首行双行文本)
td.contract-table__name {
white-space: normal;
word-break: break-all;
@@ -117,7 +115,7 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
}
td {
height: 96px; // 设计行距 475→571
height: 96px;
color: @contract-cell-text;
line-height: 29px;
}
@@ -130,7 +128,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
background: @bg-color-light;
}
// 列宽按设计稿栅格比例微调(10 列合计 100%,日期/编号列留足 nowrap 宽度)
th:nth-child(1) { width: 11%; }
th:nth-child(2) { width: 9%; }
th:nth-child(3) { width: 10%; }
@@ -143,7 +140,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
th:nth-child(10) { width: 11%; }
}
// 长名称列继承正文灰(设计 46 单元格统一 #333333)
&__name {
color: @contract-cell-text;
}
@@ -177,7 +173,6 @@ const SIGN_VARIANTS: Record<SignStatus, 'primary' | 'success' | 'warning' | 'dan
}
}
// 设计 46 状态列为纯文字,不使用彩色胶囊
:deep(.status-tag) {
padding: 0;
border-radius: 0;

View File

@@ -36,44 +36,43 @@ const steps = [
</template>
<style lang="less" scoped>
// 四步签署指引(设计 39:小蓝圆序号 + 14/12 设计px 标题与说明,步距 63 设计px)
.sign-steps {
.flex(column, flex-start, stretch);
gap: 17px; // 步骤间距(设计 22 × 0.77)
gap: 17px;
&__item {
.flex(row, flex-start, flex-start);
gap: 11px; // 序号 → 文字(设计 14 × 0.77)
gap: 11px;
}
&__index {
.flex(row, center);
flex-shrink: 0;
width: 16px; // 序号圆(设计 21 × 0.77)
width: 16px;
height: 16px;
border-radius: @radius-round;
background: @primary-strong;
color: @white;
font-size: 11px; // 设计 12 → 可读下限
font-size: 11px;
font-weight: 700;
line-height: 1;
}
&__body {
.flex(column, flex-start, stretch);
gap: 5px; // 标题 → 说明(设计 6 × 0.77)
gap: 5px;
min-width: 0;
}
&__title {
font-size: 11px; // 设计 14 → 可读下限
font-size: 11px;
font-weight: 700;
line-height: 1.4;
color: @heading-color;
}
&__desc {
font-size: 11px; // 设计 12 → 可读下限
font-size: 11px;
line-height: 1.5;
}
}

View File

@@ -5,7 +5,6 @@ import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { AppButton } from '@/components'
import type { FileInfo } from '@/types/api'
// 页面容器:数据只经 store,不直接 import api
import { useContractStore } from '@/stores/modules/contract'
import ContractInfoCard from './cpns/ContractInfoCard.vue'
@@ -80,12 +79,10 @@ onMounted(load)
.contract-detail {
padding-bottom: @spacing-xxl;
// 内容列(面包屑 → 信息卡):卡自带 80 上距,这里不再叠加 gap
.container {
.flex(column, flex-start, stretch);
gap: 0;
}
// 面包屑(设计 e6c3a361:(70,104) 24/500 #666666;顶栏 72 → 行盒顶 104)
&__breadcrumb {
padding-top: 32px;
font-size: 24px;
@@ -99,7 +96,6 @@ onMounted(load)
width: 100%;
margin-top: 30px;
// 「返回」按钮
:deep(.app-button) {
height: 40px;
padding: 0 32px;

View File

@@ -4,7 +4,6 @@ import { computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
import { FilterPanel, PaginationBar } from '@/components'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useContractStore } from '@/stores/modules/contract'
import ContractTable from './cpns/ContractTable.vue'
@@ -44,7 +43,6 @@ onMounted(() => {
<template>
<div class="contract">
<!-- 顶部横幅:白底通栏 + 标题/副标语(设计 41 横幅区、46 标题规格) -->
<div class="contract__head">
<div class="container">
<h1 class="contract__title">
@@ -57,7 +55,6 @@ onMounted(() => {
</div>
<div class="container">
<!-- 内容白卡:搜索行 + 表格 + 分页(设计 46/47 卡片) -->
<div class="contract__card">
<FilterPanel
v-model:keyword="keyword"
@@ -87,13 +84,10 @@ onMounted(() => {
.contract {
padding-bottom: @spacing-xxl;
// 横幅:设计 31ee32fc y72..251(1920×179)白底通栏
// 标题盒顶 96(ink 104)、副标语盒顶 161.5(ink 171)、横幅底 251
&__head {
padding: 24px 0 52px;
background: @white;
// 标题/副标语落 x112 → 内容区左缘 70 + 42
.container {
padding-left: 42px;
}
@@ -115,16 +109,14 @@ onMounted(() => {
}
}
// 内容白卡(设计 31ee32fc:x70 y271 1780×992 圆角白卡,无阴影)
.contract .contract__card {
margin-top: 20px; // 横幅底 251 → 卡顶 271
padding: 51px 64px 59px; // 搜索框 x134 = 70+64;表格 x135
margin-top: 20px;
padding: 51px 64px 59px;
border-radius: @radius-lg;
background: @white;
// 搜索行并入卡片:去掉 FilterPanel 自带的卡面
:deep(.filter-panel) {
margin-bottom: 39px; // 搜索框底 371 → 表头 411
margin-bottom: 39px;
padding: 0;
border-radius: 0;
background: transparent;
@@ -138,8 +130,6 @@ onMounted(() => {
:deep(.filter-panel__bar) {
gap: 8px;
// 设计:重置 x816、搜索 x940。搜索框右缘 726 →
// 重置 816(margin 90 − 12 padding = 78)、搜索 940(margin 52 − 12 = 40)
.filter-panel__btn {
margin-left: 78px;
}
@@ -148,7 +138,6 @@ onMounted(() => {
margin-left: 40px;
} }
// 搜索框 134,322 592×49;占位 20/400 #999999
:deep(.filter-panel__input) {
flex: 0 0 592px;
width: 592px;
@@ -170,7 +159,6 @@ onMounted(() => {
border-color: @primary-strong;
}
// 设计按钮:重置 x816、搜索 x940,均 20/400 纯文字(DOM 序相反,用 order 对齐)
:deep(.filter-panel__btn) {
order: 1;
min-width: 0;
@@ -200,7 +188,6 @@ onMounted(() => {
color: @primary-color;
}
// 分页(设计:右对齐,页码 ink 1180/1181,`<上一页` x1388、`下一页>` x1740)
:deep(.pagination) {
justify-content: flex-end;
gap: 10px;
@@ -236,7 +223,6 @@ onMounted(() => {
color: @contract-muted;
}
// 首尾「上一页/下一页」:设计为无框纯文字
:deep(.pagination__btn:first-child),
:deep(.pagination__btn:last-child) {
min-width: auto;

View File

@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { AppButton } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useContractStore } from '@/stores/modules/contract'
import ContractSignPanel from './cpns/ContractSignPanel.vue'
@@ -67,13 +66,11 @@ onMounted(load)
padding-top: @spacing-lg;
padding-bottom: @spacing-xxl;
// 内容列(面包屑 → 签署卡 → 返回):面包屑 → 卡片 12(设计 16 × 0.77)
.container {
.flex(column, flex-start, stretch);
gap: 12px;
}
// 面包屑(设计 39:12 设计px → 可读下限 11、#9CA3AF,当前项 #4B5563 加粗)
&__breadcrumb {
font-size: 11px;
color: @text-color-disabled;
@@ -87,17 +84,16 @@ onMounted(load)
&__footer {
.flex(row, flex-end);
width: 100%;
margin-top: 19px; // 卡片底 → 按钮:设计 40 × 0.77(另计容器 12)
margin-top: 19px;
// 「返回」按钮(设计 39:#024FFF 实底、白字、小圆角)
:deep(.app-button) {
height: 30px;
padding: 0 24px; // 按钮宽约 98 设计 × 0.77
padding: 0 24px;
border: none;
border-radius: @radius-sm;
background: @primary-strong;
color: @white;
font-size: 11px; // 设计 13 → 可读下限
font-size: 11px;
}
:deep(.app-button:hover) {

View File

@@ -1,12 +1,8 @@
<script setup lang="ts">
// 业务类型图标(内联 SVG,无外部图标依赖)
// 每张卡的图标 = 浅色圆角底 + 类型主题色图形,配色取自需求提报设计稿
import type { BizIconKey } from '@/types/business/demand'
interface Props {
/** 图标标识(由 utils/bizTypeMeta.ts 的业务类型映射表给出) */
name: BizIconKey
/** 边长(设计稿为 40px) */
size?: number
}
@@ -23,7 +19,6 @@ withDefaults(defineProps<Props>(), { size: 40 })
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<!-- 互联网软件:浅蓝底 + 代码尖括号 -->
<g v-if="name === 'code'">
<rect width="40" height="40" rx="8" fill="#e9f0ff" />
<path
@@ -35,7 +30,6 @@ withDefaults(defineProps<Props>(), { size: 40 })
/>
</g>
<!-- 硬件电路:浅绿底 + 芯片 -->
<g v-else-if="name === 'chip'">
<rect width="40" height="40" rx="8" fill="#eaf6e4" />
<rect x="12" y="12" width="16" height="16" rx="2.5" stroke="#4f9c25" stroke-width="2.2" />
@@ -48,7 +42,6 @@ withDefaults(defineProps<Props>(), { size: 40 })
/>
</g>
<!-- 物联网全案:浅紫底 + 球体网格 -->
<g v-else-if="name === 'iot'">
<rect width="40" height="40" rx="8" fill="#f1e9fd" />
<circle cx="20" cy="20" r="10" stroke="#7a3fd6" stroke-width="2.2" />
@@ -60,7 +53,6 @@ withDefaults(defineProps<Props>(), { size: 40 })
/>
</g>
<!-- 生产制造:浅橙底 + 厂房 -->
<g v-else-if="name === 'factory'">
<rect width="40" height="40" rx="8" fill="#fdf1e4" />
<path
@@ -77,7 +69,6 @@ withDefaults(defineProps<Props>(), { size: 40 })
/>
</g>
<!-- 其他(含字典里未登记的类型):中性灰四宫格 -->
<g v-else>
<rect width="40" height="40" rx="8" fill="#f2f3f5" />
<rect x="12" y="12" width="7" height="7" rx="2" fill="#9aa3b0" />

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
// 底部固定操作条(设计稿:通栏白底 + 顶部细线;左侧提示 + 右侧三个按钮)
interface Props {
saving?: boolean
submitting?: boolean
@@ -52,7 +51,6 @@ const emit = defineEmits<{
</template>
<style lang="less" scoped>
// 设计稿底部操作条(浮于页面之上,展示提示文案 + 三个 232×63 按钮)
.demand-bar {
position: fixed;
right: 0;
@@ -64,8 +62,7 @@ const emit = defineEmits<{
&__inner {
.flex(row, space-between, center);
height: 104px; // 设计稿按 63 高按钮 + 上下留白推得
// 覆盖 .container 内缩:左 = 70 + 170(提示文案 x240)、右 = 70 + 197(末按钮右缘 1799)
height: 104px;
gap: @spacing-base;
padding-left: 170px;
padding-right: 121px;
@@ -75,7 +72,7 @@ const emit = defineEmits<{
.flex(row, flex-start, center);
gap: 10px;
min-width: 0;
font-size: 20px; // 设计稿 20/500 #333333
font-size: 20px;
font-weight: 500;
line-height: 29px;
color: @demand-heading;
@@ -96,12 +93,10 @@ const emit = defineEmits<{
&__actions {
.flex(row, flex-end, center);
// 设计稿按钮中心 x1125 / 1404 / 1683 → 间距 47(按钮 232 宽)
gap: 47px;
flex-shrink: 0;
}
// 设计稿三个按钮均为实底蓝 #075CFF + 白字,232×63
&__btn {
width: 232px;
height: 63px;
@@ -125,7 +120,6 @@ const emit = defineEmits<{
}
&--primary {
// 设计稿三个按钮等宽(232),主按钮不额外加宽
min-width: 232px;
background: @demand-secondary-bg;
color: @white;

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
// 附件上传行 + 附件列表(真实接口:POST /web/workOrderDraft/upload → SysOssVo)
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import type { DemandAttachment } from '@/types/business/demand'
@@ -19,10 +18,8 @@ const emit = defineEmits<{
const inputRef = ref<HTMLInputElement | null>(null)
/** 与后端/UploadArea 同口径:单文件不超过 1G */
const MAX_SIZE = 1024 * 1024 * 1024
/** 文件类型标识色(设计稿里 PDF 红、Word 蓝等,按后缀归类) */
const FILE_TONES: Record<string, string> = {
pdf: '#f54a45',
doc: '#2f6bff',
@@ -42,7 +39,6 @@ const FILE_TONES: Record<string, string> = {
webp: '#7a3fd6',
}
/** 缩写展示(长后缀截断,压缩包统一 ZIP) */
const FILE_LABELS: Record<string, string> = {
doc: 'DOC',
docx: 'DOC',
@@ -85,17 +81,14 @@ function onChange(event: Event): void {
}
emit('upload', file)
}
// 清空以便再次选择同一个文件
input.value = ''
}
/** 预览:OSS 地址浏览器可直接打开(图片 / PDF) */
function onPreview(file: DemandAttachment): void {
if (!file.url) return
window.open(file.url, '_blank', 'noopener')
}
/** 下载:a[download] 对跨域地址可能被忽略,加 target=_blank 兜底 */
function onDownload(file: DemandAttachment): void {
if (!file.url) return
const link = document.createElement('a')
@@ -216,13 +209,12 @@ function onDownload(file: DemandAttachment): void {
&__label {
flex-shrink: 0;
font-size: 20px; // 设计稿 20/500 @(194,1376)
font-size: 20px;
font-weight: 500;
line-height: 29px;
color: @demand-heading;
}
// 设计稿:提示文案 @(294,1379) 16/400,起点 = 标签列 80 + 20
&__hint {
flex: 1;
min-width: 0;
@@ -232,7 +224,6 @@ function onDownload(file: DemandAttachment): void {
color: @demand-line;
}
// 设计稿该行未标注按钮,按钮设计稿外置(沿用站内次级按钮规格)
&__pick {
flex-shrink: 0;
height: 40px;
@@ -262,14 +253,12 @@ function onDownload(file: DemandAttachment): void {
&__list {
.flex(column, flex-start, stretch);
// 设计稿:两条 90 高灰条,间距 20
gap: 20px;
margin: 0;
padding: 0;
list-style: none;
}
// 设计稿附件条:实底 #EDEDED、无描边、90 高
&__item {
.flex(row, flex-start, center);
gap: @spacing-base;

View File

@@ -1,6 +1,4 @@
<script setup lang="ts">
// ① 选择业务类型:值域 100% 来自项目提报列表 /web/projectSubmission/list(接口有几条就渲染几张卡,
// 前端不额外追加「其他」;接口没下发就没有该选项)。
import type { BizTypeOption } from '@/types/business/demand'
import BizTypeIcon from './BizTypeIcon.vue'
@@ -16,8 +14,6 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
<template>
<div class="biz-types">
<!-- 接口一条都没下发时保留 5 个空轨道:视觉上仍是设计稿的 5 列卡片栅格,
不把 ① 区块压塌(前端不造兜底选项,只占位) -->
<div v-if="!props.options.length" class="biz-types__grid" aria-hidden="true">
<p class="biz-types__empty">
暂无可选业务类型
@@ -33,7 +29,6 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
@click="emit('update:modelValue', option.value)"
>
<span class="biz-types__check" aria-hidden="true" />
<!-- 后端 Logo(已换链为可访问地址)优先,取不到时回退前端内联 SVG -->
<img
v-if="option.iconUrl"
class="biz-types__logo"
@@ -57,7 +52,6 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
.biz-types {
&__empty {
grid-column: 1 / -1;
// 与设计稿单卡同高(206),保证 ① 区块塌陷时页面纵向节奏不变
.flex(row, center, center);
height: 206px;
border: 1px dashed @demand-line;
@@ -67,7 +61,6 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
}
&__grid {
// 设计稿:5 张卡 303/305 宽 × 206 高,x194/515/838/1160/1482 → 间距 18/18/17/16
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 17px;
@@ -79,7 +72,7 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
gap: 0;
height: 206px;
box-sizing: border-box;
padding: 44px 16px 0; // 标题 @(210,545) → 卡内 (16,106)
padding: 44px 16px 0;
border: 1px solid @demand-line;
border-radius: @radius-base;
background: @white;
@@ -91,14 +84,12 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
border-color: @demand-accent;
}
// 选中:整卡蓝底(设计稿实取 #024FFF),文字反白
&.is-active {
border-color: @demand-selected-bg;
background: @demand-selected-bg;
}
}
/** 右上角选中标记(设计稿 30 设计px):未选空心圈,选中为白环 + 蓝缝 + 白点 */
&__check {
position: absolute;
top: 22px;
@@ -118,10 +109,9 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
}
&__icon {
margin-bottom: 15px; // 图标底 → 标题顶(设计稿 545 − 图标 40 − 卡内顶 106)
margin-bottom: 15px;
}
/** 后端 Logo:与内联 SVG 同尺寸,保证两种来源视觉一致 */
&__logo {
width: 40px;
height: 40px;
@@ -130,20 +120,19 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
}
&__name {
font-size: 28px; // 设计稿 28/500
font-size: 28px;
font-weight: 500;
line-height: 45px;
color: @demand-ink;
}
&__desc {
font-size: 16px; // 设计稿 16/500
font-size: 16px;
font-weight: 500;
line-height: 23px;
color: @demand-ink;
}
// 选中卡内文字反白(设计稿:标题/描述均为白色)
&__card.is-active &__name,
&__card.is-active &__desc {
color: @white;

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
// ③ 确认信息并补充备注:用户名称 / 用户手机号(登录账号资料预填)+ 补充备注
import { computed } from 'vue'
import type { Demand } from '@/types/business/demand'
@@ -82,7 +81,6 @@ function onRemark(event: Event): void {
&__row {
.flex(row, flex-start, flex-start);
// 设计稿:两个 503 宽输入框(x194→697 / x770→1273),间距 73
gap: 73px;
}
@@ -92,12 +90,10 @@ function onRemark(event: Event): void {
min-width: 0;
}
// 行内两列(用户名称 / 用户手机号)定宽;补充备注整行铺满
&__row &__field {
flex: 0 0 503px;
}
// 设计稿:备注行标签顶 y1901,用户行控件底 y1871 → 间距 30
&__row + &__field {
margin-top: 30px;
}

View File

@@ -1,11 +1,5 @@
<script setup lang="ts">
// ② 填写需求信息:项目名称 / 核心需求描述 / 预算范围 + 预计开发周期 / 附件上传
//
// 预算范围:值域来自字典 vm_budget_range,5 项同排等宽。
// 前 4 项 → 胶囊按钮(点选 = 选中该档位)
// 最后一项(字典 label「手填」)→ **本身就是一个输入框**,占位文案就是「手填」,
// 直接在里面写金额;不再有"点一下额外展开一个输入框"的交互。
// 手写内容直接写进 form.budgetRange(后端没有 budgetCustom 的落库位置),故限长 30。
import { computed, ref } from 'vue'
import type { Demand, DemandAttachment, DictOption } from '@/types/business/demand'
import { MANUAL_BUDGET_MAX, isManualBudget } from '@/utils/budgetMeta'
@@ -13,9 +7,7 @@ import DemandAttachments from './DemandAttachments.vue'
interface Props {
demand: Demand
/** 预算范围选项(字典 vm_budget_range,手填项已由 store 排到最后) */
budgetOptions: DictOption[]
/** 附件是否正在上传(透传给附件区做按钮禁用) */
uploading?: boolean
}
@@ -31,35 +23,28 @@ const DESCRIPTION_MAX = 500
const descLength = computed(() => props.demand.requirementDesc.length)
/** 前 4 项:普通胶囊按钮 */
const presetOptions = computed(() =>
props.budgetOptions.filter((option) => !isManualBudget(option.dictLabel)),
)
/** 最后一项:输入框(占位文案直接用字典 label,后端为「手填」) */
const manualOption = computed(
() => props.budgetOptions.find((option) => isManualBudget(option.dictLabel)) ?? null,
)
const manualPlaceholder = computed(() => manualOption.value?.dictLabel ?? '手填')
/** 输入框聚焦中(用于"刚点进来还没打字"时也给选中态反馈) */
const manualFocused = ref(false)
/** 输入框 DOM 引用(点预设时要把它真的失焦) */
const manualInput = ref<HTMLInputElement | null>(null)
/** 当前是否选中了某个预设胶囊(用于保证"恰有一个控件高亮") */
const presetSelected = computed(() =>
presetOptions.value.some((option) => option.dictValue === props.demand.budgetRange),
)
/** 输入框选中态:已写入手填内容,或正在输入且此时没有选中预设 */
const manualActive = computed(() =>
props.demand.budgetManual || (manualFocused.value && !presetSelected.value),
)
/** 输入框显示值:非手填模式下留空,把位置让给占位文案 */
const manualValue = computed(() => (props.demand.budgetManual ? props.demand.budgetRange : ''))
function onProjectName(event: Event): void {
@@ -75,24 +60,20 @@ function onCycle(event: Event): void {
emit('update', { developmentCycle: raw === '' ? '' : Number(raw) })
}
/** 预设胶囊是否选中(手填模式下预设一律不选中,避免两个控件同时高亮) */
function isPresetActive(option: DictOption): boolean {
return !props.demand.budgetManual && props.demand.budgetRange === option.dictValue
}
function onBudget(option: DictOption): void {
// 先让输入框真的失焦,避免"在输入框里打完字又改点档位"时两个控件同时高亮
manualFocused.value = false
manualInput.value?.blur()
emit('update', { budgetRange: option.dictValue, budgetManual: false })
}
/** 在输入框里打字即进入手写模式,内容直接作为 budgetRange */
function onBudgetManualInput(event: Event): void {
emit('update', { budgetRange: (event.target as HTMLInputElement).value, budgetManual: true })
}
/** 失焦时若一个字都没写,退回"未选择"(避免空手写值卡住提交校验) */
function onBudgetManualBlur(event: Event): void {
manualFocused.value = false
if ((event.target as HTMLInputElement).value.trim() === '') {
@@ -149,7 +130,6 @@ function onBudgetManualBlur(event: Event): void {
>
{{ option.dictLabel }}
</button>
<!-- 第 5 个控件即输入框:直接写金额(后端 budgetRange 列 varchar(30),故限长 30) -->
<input
v-if="manualOption"
id="demand-budget-manual"
@@ -194,20 +174,17 @@ function onBudgetManualBlur(event: Event): void {
<style lang="less" scoped>
.demand-info {
.flex(column, flex-start, stretch);
// 字段间统一节奏:上一控件底 → 下一标签顶
// 设计稿实测:input 底 881 → 描述标签顶 910(29 行盒)→ 控件 954;预算行 1224→1254;附件 1346→1376
gap: 29px;
width: 1605px; // 设计稿:所有控件统一 1605 宽(x194 → 1799)
width: 1605px;
&__field {
.flex(column, flex-start, stretch);
gap: 14px; // 标签行盒底 → 控件顶(设计稿 789+29 → 832)
gap: 14px;
min-width: 0;
}
&__row {
.flex(row, flex-start, flex-start);
// 设计稿:预算列 892 宽(x194→1086)+ 间距 61 + 周期列 652 宽(x1147→1799)
gap: 61px;
.demand-info__field {
@@ -222,7 +199,7 @@ function onBudgetManualBlur(event: Event): void {
}
&__label {
font-size: 20px; // 设计稿 20/500 #333333
font-size: 20px;
font-weight: 500;
line-height: 29px;
color: @demand-heading;
@@ -235,7 +212,6 @@ function onBudgetManualBlur(event: Event): void {
&__input {
.text-control();
// 设计稿:49 高、20 字号、描边 #999999、内缩 18
height: 49px;
padding: 0 18px;
border-color: @demand-line;
@@ -256,7 +232,6 @@ function onBudgetManualBlur(event: Event): void {
&__textarea {
.text-control();
// 设计稿:270 高、占位内缩 18/10
height: 270px;
min-height: 270px;
padding: 10px 18px 24px;
@@ -283,11 +258,9 @@ function onBudgetManualBlur(event: Event): void {
&__budgets {
.flex(row, flex-start, stretch);
// 设计稿:5 个 165 宽胶囊,间距 17
gap: 17px;
}
/** 预算控件外观:4 个胶囊按钮 + 第 5 个手填输入框共用同一套规格 */
&__budget {
flex: 1;
min-width: 0;
@@ -318,7 +291,6 @@ function onBudgetManualBlur(event: Event): void {
}
}
/** 手填输入框:外观同胶囊,占位文案即「手填」 */
&__budget--manual {
outline: none;

View File

@@ -1,7 +1,5 @@
<!-- 页面:需求提报(Demand) -->
<script setup lang="ts">
// 需求提报(单页三段卡片 + 底部固定操作条,数据全部走真实接口)
// 页面 → store → api;页面不直接 import api
import { onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useDemandStore } from '@/stores/modules/demand'
@@ -57,7 +55,6 @@ onMounted(() => {
<template>
<div class="demand-page" :class="{ 'is-loading': loading }">
<!-- 设计稿:导航下方 1920×179 白色通栏页头(标题 36/700 @x112,副标题 24/500 @y171) -->
<header class="demand-page__hero">
<div class="container demand-page__hero-inner">
<h1 class="demand-page__title">
@@ -69,10 +66,8 @@ onMounted(() => {
</div>
</header>
<!-- 设计稿:三段内容同处一张 1780×2186 白卡(矩形 148286 @(70,271)) -->
<div class="container">
<div class="demand">
<!-- ① 选择业务类型 -->
<section class="demand__section">
<h2 class="demand__heading">
<span class="demand__index">01</span>
@@ -85,7 +80,6 @@ onMounted(() => {
/>
</section>
<!-- ② 填写需求信息 -->
<section class="demand__section">
<h2 class="demand__heading">
<span class="demand__index">02</span>
@@ -101,7 +95,6 @@ onMounted(() => {
/>
</section>
<!-- ③ 确认信息并补充备注 -->
<section class="demand__section">
<h2 class="demand__heading">
<span class="demand__index">03</span>
@@ -127,7 +120,6 @@ onMounted(() => {
<style lang="less" scoped>
.demand-page {
// 固定底条 72px + 呼吸间距
padding-bottom: 104px;
&.is-loading .demand {
@@ -135,7 +127,6 @@ onMounted(() => {
pointer-events: none;
}
// 设计稿:白色通栏页头 @(0,72) 1920×179,文案 36/700 @(112,104)、24/500 @(112,171)
&__hero {
height: 179px;
box-sizing: border-box;
@@ -144,7 +135,7 @@ onMounted(() => {
}
&__hero-inner {
padding-left: 42px; // 文案 x112 = 内容区 x70 + 42
padding-left: 42px;
}
&__title {
@@ -164,22 +155,21 @@ onMounted(() => {
}
}
// 设计稿:白卡 @(70,271) 1780×2186;三段标题序号 x134、标题文字 x194
.demand {
margin-top: 20px; // 271 − (72+179) = 20
padding: 48px 56px 111px; // 序号顶 319 − 271 = 48
padding: 48px 56px 111px;
background: @white;
&__heading {
.flex(row, flex-start, center);
gap: 15px;
margin: 0 0 50px; // 01:序号块底 389 → 业务卡顶 439
padding-left: 8px; // 序号落 x134 = 卡内 x70+64 → 64-56 = 8
margin: 0 0 50px;
padding-left: 8px;
}
&__index {
flex-shrink: 0;
font-size: 48px; // 设计稿 48/500 #024FFF
font-size: 48px;
font-weight: 500;
line-height: 70px;
font-variant-numeric: tabular-nums;
@@ -187,7 +177,7 @@ onMounted(() => {
}
&__label {
font-size: 28px; // 设计稿 28/500 #333333
font-size: 28px;
font-weight: 500;
line-height: 41px;
color: @demand-heading;
@@ -198,12 +188,10 @@ onMounted(() => {
color: @danger-color;
}
// 表单列对齐标题文字 x194 = 卡内 x70 + 124(序号行宽 55 + gap 15 + 序号内缩 8 = 78,再补 46)
&__heading + * {
margin-left: 46px;
}
// 段间距(设计稿实测):01 区底 645 → 02 序号顶 705 = 60;02 区底 1639 → 03 序号顶 1689 = 50
&__section + &__section {
margin-top: 60px;
}
@@ -212,7 +200,6 @@ onMounted(() => {
margin-top: 50px;
}
// ② ③ 段:标题块(70) 与首个表单标签间距更紧(序号顶 705/1689 → 标签顶 789/1779 = 84/90)
&__section + &__section &__heading {
margin-bottom: 0;
}

View File

@@ -2,7 +2,6 @@
import { computed, onMounted, watch } from 'vue'
import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { Bill, BillStatus } from '@/types/business/finance'
import { formatMoney } from '@/utils/format'
@@ -15,11 +14,6 @@ const { currentBill } = storeToRefs(financeStore)
const billId = computed(() => String(route.params.id))
/**
* 设计 31 是三张并排状态卡(523/825/1127 各 270×476):
* 已支付(红金额)+ 待支付(橙金额)+ 未到期(灰金额)。
* 页面实际只展示当前账单状态那一张,其余两张是同一组件的另外两种状态。
*/
const STATUS_CARDS: BillStatus[] = ['已支付', '待支付', '未到期']
const AMOUNT_CLASS: Record<BillStatus, string> = {
@@ -29,7 +23,6 @@ const AMOUNT_CLASS: Record<BillStatus, string> = {
已取消: 'is-idle',
}
/** 演示用:三张卡各自的账单数据(当前账单代入对应状态卡) */
const cards = computed<Array<{ status: BillStatus; bill: Bill | null }>>(() =>
STATUS_CARDS.map((status) => ({
status,
@@ -38,12 +31,10 @@ const cards = computed<Array<{ status: BillStatus; bill: Bill | null }>>(() =>
)
async function load(): Promise<void> {
// 支付信息(渠道 / 时间 / 流水号)已由后端回写在账单本身上,无需再查支付结果
await financeStore.fetchDetail(billId.value)
}
function onPay(id: string): void {
// 进收银台(确认支付):选支付方式 → 微信出码 / 支付宝跳转
void router.push({ path: '/finance/checkout', query: { ids: id } })
}
@@ -59,7 +50,6 @@ onMounted(() => {
<template>
<div class="bill-detail">
<div class="container">
<!-- 面包屑 (70,117)「财务中心 / 账单明细 /」 + 「账单详情」 -->
<nav class="bill-detail__breadcrumb">
<RouterLink to="/finance" class="bill-detail__breadcrumb-link">
财务中心 /
@@ -70,14 +60,12 @@ onMounted(() => {
<span class="bill-detail__breadcrumb-current">账单详情</span>
</nav>
<!-- 三张状态卡 (523/825/1127,158) 各 270×476 -->
<div v-if="currentBill" class="bill-detail__cards">
<section
v-for="card in cards"
:key="card.status"
class="bill-detail__card"
>
<!-- 卡头:对勾圆 + 状态词 (539,278) 238×21 16/700 #1F2937 -->
<div class="bill-detail__head">
<span class="bill-detail__check" aria-hidden="true">✓</span>
<h3 class="bill-detail__status">
@@ -85,7 +73,6 @@ onMounted(() => {
</h3>
</div>
<!-- 付款金额:标签 (590.23,315) + 金额 (653.8,309) 18/700 -->
<div class="bill-detail__amount-row">
<span class="bill-detail__amount-label">付款金额:</span>
<span
@@ -94,7 +81,6 @@ onMounted(() => {
>¥ {{ formatMoney(card.bill?.amount ?? currentBill.amount, 0) }}</span>
</div>
<!-- 支付信息四行:标签 (547,y) 12/400 #6B7280 + 值 12/700 #1F2937 -->
<dl class="bill-detail__fields">
<div class="bill-detail__field">
<dt class="bill-detail__label">
@@ -122,7 +108,6 @@ onMounted(() => {
</div>
</dl>
<!-- 订单小卡 (555.5/857.5/1159.5,481..) 205 宽 -->
<div class="bill-detail__order">
<span class="bill-detail__order-title">
{{ card.status }}订单
@@ -137,7 +122,6 @@ onMounted(() => {
</div>
</div>
<!-- 返回 (727.4,594) 43.2×16 12/500 -->
<button
v-if="card.status === '待支付'"
class="bill-detail__cta"
@@ -163,13 +147,11 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 31 账单详情(1920 画布 1:1)——内容区 x70→1850 = 1780
.bill-detail {
width: 100%;
padding-bottom: 325px; // 卡片底 634 → 页脚 1087
padding-bottom: 325px;
background: @contract-page-bg;
// 面包屑 (70,117):文字 ink y117,卡片顶 158 → 面包屑盒 86..131
&__breadcrumb {
.flex(row, flex-start, center);
height: 86px;
@@ -195,11 +177,10 @@ onMounted(() => {
font-weight: 500;
}
// 三张卡并排:x523 / 825 / 1127,间距 32
&__cards {
.flex(row, flex-start, flex-start);
gap: 32px;
padding-left: 453px; // 内容区起点 70 → 首卡 523
padding-left: 453px;
box-sizing: border-box;
}
@@ -212,11 +193,9 @@ onMounted(() => {
box-sizing: border-box;
}
// 卡头:对勾圆 (645.27,204) 34/400 白字 + 状态词 (539,278)
&__head {
.flex(row, flex-start, center);
gap: 0;
// 状态词盒 y278(卡内 120)、对勾圆 y204(卡内 46)→ 用 align-items:flex-start + 各自 margin
align-items: flex-start;
padding: 46px 0 0 16px;
height: 141px;
@@ -236,32 +215,30 @@ onMounted(() => {
line-height: 1;
order: 2;
flex-shrink: 0;
// 设计圆 x629.27(卡内 106.27);渲染值 714 → 左移 84.75
transform: translateX(-84.75px);
}
&__status {
order: 1;
width: 238px;
margin-top: 74px; // 卡内 46 → 120(状态词顶)
margin-top: 74px;
font-size: 16px;
font-weight: 700;
line-height: 21px;
color: @finance-ink;
}
// 付款金额行:标签卡内 (67.23,157),金额卡内 (130.8,151)
&__amount-row {
position: relative;
width: 238px;
height: 51px; // 行顶 = 卡内 130(金额盒顶 309−158=151 − 行内偏移 21)
height: 51px;
margin: 0 0 0 16px;
}
&__amount-label {
position: absolute;
top: 16px; // 设计 ink y315(卡内 157)
left: 51.23px; // 卡内 67.23 − 16
top: 16px;
left: 51.23px;
font-size: 12px;
font-weight: 400;
line-height: 16px;
@@ -270,8 +247,8 @@ onMounted(() => {
&__amount {
position: absolute;
top: 10px; // 设计盒顶 y309(卡内 151)
left: 114.8px; // 卡内 130.8 − 16
top: 10px;
left: 114.8px;
font-size: 18px;
font-weight: 700;
line-height: 24px;
@@ -282,7 +259,6 @@ onMounted(() => {
&.is-idle { color: @finance-idle; }
}
// 支付信息:标签卡内 (24,207) 起,行距 28
&__fields {
.flex(column, flex-start, stretch);
gap: 12px;
@@ -297,7 +273,7 @@ onMounted(() => {
}
&__label {
flex: 0 0 77.52px; // 值统一从卡内 101.52 起
flex: 0 0 77.52px;
font-size: 12px;
font-weight: 400;
line-height: 16px;
@@ -314,7 +290,6 @@ onMounted(() => {
word-break: break-all;
}
// 订单小卡:卡内 x32.5,标题顶卡内 323(设计 481−158)
&__order {
.flex(column, flex-start, flex-start);
gap: 0;
@@ -368,11 +343,10 @@ onMounted(() => {
color: @finance-ink;
}
// 底部按钮 (727.4,594) 43.2×16 文字;盒宽 90 居中于 270 卡
&__cta {
position: absolute;
left: 50%;
top: 428px; // 按钮文字 y594(卡内 436),盒高 32 → 盒顶 428
top: 428px;
width: 90px;
height: 32px;
border: none;
@@ -381,7 +355,6 @@ onMounted(() => {
color: @white;
font-size: 12px;
font-weight: 500;
/* 按钮基线:文字 ink y594 → 盒顶 428 + (32−16)/2 = 436 */
padding-bottom: 6px;
box-sizing: border-box;
transform: translateX(-50%);

View File

@@ -3,7 +3,6 @@ import { computed, onMounted, ref } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
import { PaginationBar } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { BillStatus } from '@/types/business/finance'
import BillSummaryBar from './cpns/BillSummaryBar.vue'
@@ -16,7 +15,6 @@ const { query, list, total } = storeToRefs(financeStore)
const keyword = ref('')
const selectedIds = ref<string[]>([])
/** 设计 30:状态分段组 4 项,「全部」选中态为实底 #024FFF */
const STATUS_TABS: Array<{ label: string; value: BillStatus | 'all' }> = [
{ label: '全部', value: 'all' },
{ label: '待支付', value: '待支付' },
@@ -24,7 +22,6 @@ const STATUS_TABS: Array<{ label: string; value: BillStatus | 'all' }> = [
{ label: '未到期', value: '未到期' },
]
/** 统计卡三组(设计 30:(71/663.67/1256.33, 155) 各 592.67×60) */
const STATS = computed(() => [
{ label: '总笔数', value: String(total.value) },
{ label: '总金额', value: String(list.value.reduce((sum, bill) => sum + bill.amount, 0)) },
@@ -63,7 +60,6 @@ function onPay(id: string): void {
function onBatchPay(ids: string[]): void {
if (ids.length === 0) return
// 单笔 / 多笔都进收银台(收银台按 `?ids=` 聚合出「订单明细」与合计)
void router.push({ path: '/finance/checkout', query: { ids: ids.join(',') } })
}
@@ -76,7 +72,6 @@ onMounted(() => {
<template>
<div class="bills">
<div class="container">
<!-- 面包屑:(70,103) 「财务中心 >」13/400 #9CA3AF + 「账单明细」13/500 #4B5563 -->
<nav class="bills__breadcrumb">
<RouterLink to="/finance" class="bills__breadcrumb-link">
财务中心 &gt;
@@ -84,7 +79,6 @@ onMounted(() => {
<span class="bills__breadcrumb-current">账单明细</span>
</nav>
<!-- 统计卡:(70,132) 1780×106 白底 + #F0F1F3 描边,三组等宽 592.67 -->
<div class="bills__stats">
<div v-for="item in STATS" :key="item.label" class="bills__stat">
<span class="bills__stat-label">{{ item.label }}</span>
@@ -92,7 +86,6 @@ onMounted(() => {
</div>
</div>
<!-- 工具条:(70,252) 1780×71;Tab 组 (92,270.5) 279×34、搜索框 (405,269) 1300×37 -->
<div class="bills__toolbar">
<div class="bills__tabs">
<button
@@ -121,7 +114,6 @@ onMounted(() => {
</button>
</div>
<!-- 表格卡:(70,337) 1780×365.36,表头 (77.5,344.5) 1765×41.77 -->
<div class="bills__board">
<BillTable
:bills="list"
@@ -140,7 +132,6 @@ onMounted(() => {
</div>
</div>
<!-- 汇总条:通栏白条 (0,718) 1920×66 -->
<BillSummaryBar
:bills="list"
:selected-ids="selectedIds"
@@ -150,18 +141,17 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 30 账单明细(1920 画布 1:1)——内容区 x70→1850 = 1780
.bills {
.flex(column, flex-start);
align-items: stretch;
gap: 0;
width: 100%;
padding-bottom: 14px; // 汇总条底 784 → 页脚 1087 的留白由页脚自身高度承担
padding-bottom: 14px;
background: @contract-page-bg;
&__breadcrumb {
.flex(row, flex-start, center);
height: 49px; // 组 6 (0,89) 高 31 + 上下留白 → 盒 y72..121,文字 ink y103
height: 49px;
padding-top: 14px;
font-size: 13px;
font-weight: 400;
@@ -179,18 +169,16 @@ onMounted(() => {
}
&__breadcrumb-current {
// 设计:账单明细起点 x138.84;「 > 」由 CSS 绘制,宽 4.44px
margin-left: 4.44px;
color: @finance-entry-text;
font-weight: 500;
}
// 统计卡 (70,132) 1780×106
&__stats {
.flex(row, flex-start, flex-start);
gap: 0;
height: 106px;
margin-top: 11px; // 面包屑盒底 121 → 卡顶 132
margin-top: 11px;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
@@ -201,7 +189,7 @@ onMounted(() => {
.flex(column, flex-start, flex-start);
gap: 6px;
width: 592.67px;
padding: 22px 0 0 269px; // 标签 x340,卡边框内起点 x71 → 内缩 269
padding: 22px 0 0 269px;
box-sizing: border-box;
}
@@ -219,20 +207,18 @@ onMounted(() => {
color: @finance-ink;
}
// 工具条 (70,252) 1780×71
&__toolbar {
.flex(row, flex-start, center);
gap: 0;
height: 71px;
margin-top: 14px; // 统计卡底 238 → 工具条顶 252
padding: 0 0 0 22px; // Tab 组 x92,卡边框内起点 x70 → 内缩 22
margin-top: 14px;
padding: 0 0 0 22px;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
box-sizing: border-box;
}
// Tab 组 (92,270.5) 279×34
&__tabs {
.flex(row, flex-start, center);
gap: 0;
@@ -243,7 +229,6 @@ onMounted(() => {
overflow: hidden;
flex-shrink: 0;
box-sizing: border-box;
// Tab 盒 (92,270.5) 279×34 → 文字 ink x103.57;等分 69.75
padding: 0 11.3px 0 9.2px;
}
@@ -276,11 +261,10 @@ onMounted(() => {
}
}
// 搜索框 (405,269) 1300×37 底 #F3F4F6
&__search {
width: 1300px;
height: 37px;
margin-left: 33px; // Tab 组右缘 371 → 搜索框 405
margin-left: 33px;
padding: 0 16px;
border: none;
border-radius: 0;
@@ -306,8 +290,8 @@ onMounted(() => {
flex-shrink: 0;
&--reset {
width: 62.2px; // 重置 x1721.4 文字 43.2 居中
margin-left: 15.4px; // 搜索框右缘 1705 → 重置盒 1721.4
width: 62.2px;
margin-left: 15.4px;
color: @finance-entry-text;
&:hover {
@@ -316,7 +300,7 @@ onMounted(() => {
}
&--primary {
width: 62.2px; // 搜索 x1783.4 文字 43.2 居中
width: 62.2px;
color: @white;
background: @primary-strong;
@@ -326,20 +310,18 @@ onMounted(() => {
}
}
// 表格卡 (70,337) 1780×365.36(含分页)
&__board {
margin-top: 14px; // 工具条底 323 → 表格卡顶 337
margin-top: 14px;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
overflow: hidden;
}
// 分页:右对齐,页码 12/400;设计 (1631.93~1823.93, 670.36)
:deep(.pagination) {
justify-content: flex-end;
gap: 3.7px; // 设计页码间距:盒距 6 → 页码字距 3.7
padding: 8px 26px 30px 0; // 下行上缘 662 → 表格底,页码 ink 670.36
gap: 3.7px;
padding: 8px 26px 30px 0;
}
:deep(.pagination__btn) {

View File

@@ -3,7 +3,6 @@ import { computed, onBeforeUnmount, ref, watch } from 'vue'
import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { PayMethod } from '@/types/business/finance'
import { createMerchantOrderNo, PAY_METHODS } from '@/utils/payMeta'
@@ -12,55 +11,22 @@ import CheckoutBillCard from './cpns/CheckoutBillCard.vue'
import PayMethodList from './cpns/PayMethodList.vue'
import WechatQrDialog from './cpns/WechatQrDialog.vue'
/**
* 收银台(确认支付)页 —— 路由 `/finance/checkout?requirementId=<需求id>[&ids=<期次id>]`。
*
* <p><b>版式(Web 两栏)</b>:面包屑 → 左栏「订单明细卡 + 选择支付方式卡」(占满剩余宽)
* + 右栏 360px **粘性**「支付金额 / 订单数量 / 支付方式 / 确认支付」;窄屏(≤992px)回落单栏。</p>
*
* <p>⚠️ 与移动端设计稿的差异(本轮改动原因):早期按「支付」移动端设计稿(250 设计px ≈ 375 视口)
* 做成一根 **480px 居中窄列 + 底部固定橙色操作条**,在 PC 上左右各留一大片空白(实测 1229 视口下
* 卡片仅占 480px)。本轮改成 Web 两栏,并同步把卡片从移动端尺度抬到桌面尺度:卡标题 14→16px
* (与同目录 `PayMethodDialog` / `FinanceChart` / `WechatQrDialog` 的 16px/600 对齐)、
* 条目内边距 12/14→16/18px、金额字号上调;**底部固定操作条取消**,CTA 移入右侧汇总栏。</p>
*
* <p><b>订单明细数据源</b>:**复用项目详情「合同财务」那个现成接口**
* `GET /web/requirementPool/get/finance/{需求id}` —— 入参是需求 id,后端把「需求 + 项目」
* 拼成联合结构后把付款计划下发在 `billPlans` 里。本栈支付口径是 `vm_bill_plan.id`,
* 故订单明细直接取这份 `billPlans`(见 `api/finance.ts#getCheckoutBills`)。</p>
*
* <p><b>支付</b>(后端 `controller/pc/pay/WebScanPayController`,类级 `@SaIgnore`):</p>
* <ul>
* <li>微信 → `POST /pay/web/wechat/native` `{orderNo, amount, billIds}` ⇒ `codeUrl` → 本页弹窗渲染二维码;</li>
* <li>支付宝 → `POST /pay/web/alipay/page` `{outTradeNo, amount, billIds}` ⇒ `formBody`
* (实测是收银台跳转地址,新标签页打开)。</li>
* </ul>
*
* <p><b>`billIds` 为什么必须下发</b>:后端在下单成功时落一条 `vm_finance_payment`
* (status = CREATED),并把期次 id 列表写进 `request_payload`;支付成功回调再按这张清单
* 为**每期**落一行 `vm_finance_payment_bill` 并把 `vm_bill_plan` 置为 DONE。
* 不带 `billIds` 时后端只落支付单,分摊明细与回写都会跳过。</p>
*/
const route = useRoute()
const router = useRouter()
const financeStore = useFinanceStore()
const { checkoutBills, checkoutLoading, payOrder } = storeToRefs(financeStore)
/** 路由带入的**需求 id**(项目详情「立即支付」跳转时带上) */
const requirementId = computed(() => {
const raw = route.query.requirementId
return String(Array.isArray(raw) ? raw[0] : (raw ?? '')).trim()
})
/** 路由**可选**带入的期次 id(`?ids=`):用于精确指定付哪一期 */
const planIds = computed(() => {
const raw = route.query.ids
const text = Array.isArray(raw) ? raw.join(',') : String(raw ?? '')
return text.split(',').map((id) => id.trim()).filter(Boolean)
})
/** 下单要带的期次清单(`billIds`):以**实际加载到的期次**为准(`vm_bill_plan.id`) */
const billIds = computed(() => checkoutBills.value.map((bill) => bill.id))
const method = ref<PayMethod>('wechat')
@@ -71,7 +37,6 @@ const totalAmount = computed(() =>
checkoutBills.value.reduce((sum, bill) => sum + Number(bill.amount || 0), 0),
)
/** 右侧汇总栏的「支付方式」展示名:与左侧选择卡同源(`PAY_METHODS`),不另写一份文案 */
const methodLabel = computed(
() => PAY_METHODS.find((item) => item.value === method.value)?.label ?? '—',
)
@@ -82,12 +47,6 @@ async function load(): Promise<void> {
await financeStore.loadCheckout(requirementId.value, planIds.value)
}
/**
* 打开支付宝收银台。
*
* <p>后端 `pageExecute(request, "GET")` 实测返回的是**跳转地址**(`https://…/gateway.do?…`),
* 直接开新标签页即可;万一日后改回 POST 模式返回自动提交的 HTML 表单,这里也兜住。</p>
*/
function openAlipay(body: string): void {
if (/^\s*https?:\/\//i.test(body)) {
window.open(body, '_blank', 'noopener')
@@ -114,7 +73,6 @@ async function onConfirm(): Promise<void> {
if (!canPay.value) return
submitting.value = true
try {
// 商户订单号由前端生成(后端两个下单接口都要求调用方传 outTradeNo)
const orderNo = createMerchantOrderNo()
if (method.value === 'wechat') {
@@ -137,35 +95,24 @@ async function onConfirm(): Promise<void> {
openAlipay(body)
}
catch {
// 失败原因已由 utils/request.ts 拦截器统一弹出,这里只需兜住 Promise 拒绝
}
finally {
submitting.value = false
}
}
/** 二维码过期 / 用户主动刷新:换一个新商户单号重新下单 */
async function onRefreshQr(): Promise<void> {
try {
await financeStore.payByWechatNative(createMerchantOrderNo(), totalAmount.value, billIds.value)
}
catch {
// 同上
}
}
/**
* 「我已完成支付」→ 结果页。
*
* <p>⚠️ 账单置为 PAID 由**后端异步回调**(微信/支付宝 → MQ → `WechatPayController#handleCallback`)
* 完成,用户点按钮这一刻回调可能还没到,结果页会短暂显示「暂无支付结果」,
* 刷新即可。若要做成稳定体感,需要后端提供「按订单号查支付状态」的端点供结果页轮询。</p>
*/
function onPaid(): void {
qrVisible.value = false
const first = checkoutBills.value[0]
if (!first) return
// 结果页同样按「需求 id + 期次 id」查(复用财务接口),故把需求 id 一并带过去
void router.push({
path: `/finance/bills/${first.id}/pay/result`,
query: { requirementId: requirementId.value },
@@ -261,22 +208,15 @@ onBeforeUnmount(() => {
<style lang="less" scoped>
.checkout {
// ⚠️ 第三个参数必须给 stretch:`.flex()` 的 align 默认 center,会给面包屑这类
// 内容宽子元素「压窄 + 水平居中」——实测面包屑跑到页面正中间去了。
.flex(column, flex-start, stretch);
gap: @spacing-base;
padding-top: @spacing-lg;
// 底部固定操作条已取消(Web 版 CTA 在右侧汇总栏),这里只留常规页脚呼吸位
padding-bottom: @spacing-xxl;
&__breadcrumb {
font-size: @font-size-base;
}
// Web 两栏:左「订单明细 + 选择支付方式」自适应,右 360px 汇总栏
// ⚠️ 这里**不能**写 `align-items: start` —— 那会让右栏收缩成自身内容高度,
// 侧栏里的 `position: sticky` 就没有可滑动空间,粘性会整个失效(实测踩过)。
// 保持默认 stretch,右栏与左栏等高,sticky 才有生效范围。
&__layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
@@ -285,7 +225,6 @@ onBeforeUnmount(() => {
}
&__main {
// `.flex()` 的 align 默认 center,会让两张卡按内容宽度收缩 ⇒ 必须显式拉满
.flex(column, flex-start, stretch);
gap: @spacing-base;
min-width: 0;
@@ -295,7 +234,6 @@ onBeforeUnmount(() => {
min-width: 0;
}
// 汇总栏:跟随滚动(顶栏 64px 是 sticky,故留出顶栏高度 + 一档间距)
&__summary {
position: sticky;
top: calc(@header-height + @spacing-base);
@@ -391,8 +329,6 @@ onBeforeUnmount(() => {
font-size: @font-size-base;
}
// 窄屏兜底:全站未启用响应式,这里只做「侧栏落到主栏下方」的单栏回落,
// 避免主栏被 360px 侧栏挤成一条缝。
@media (max-width: 992px) {
&__layout {
grid-template-columns: minmax(0, 1fr);

View File

@@ -27,7 +27,6 @@ function onBatchPay(): void {
</script>
<template>
<!-- 设计 30:通栏白条 (0,718) 1920×66,左右内容对齐 x27.25 / x1625.03~1855.4 -->
<div class="bill-summary">
<div class="bill-summary__inner">
<div class="bill-summary__left">
@@ -62,7 +61,6 @@ function onBatchPay(): void {
box-sizing: border-box;
flex-shrink: 0;
// 汇总条内容与页面内容区同步留白 70,与上方卡片左右对齐
&__inner {
.flex(row, space-between, center);
width: 1920px;

View File

@@ -16,7 +16,6 @@ const emit = defineEmits<{
'update:selection': [ids: string[]]
}>()
/** 本地勾选集合(由 selectedIds prop 同步) */
const selection = ref<Set<string>>(new Set(props.selectedIds))
watch(
@@ -50,8 +49,6 @@ function toggleAll(): void {
emit('update:selection', [...selection.value])
}
/** 列宽(设计 30 表头实测:序号 x121.5 / 账单名称 x384.9 / 账单号 x695.09 / 流水号 x843.12 /
* 项目名称 x1237.19 / 订单金额 x1576.6 / 状态 x1673.6 / 操作 x1768.6) */
const COLUMNS = [
{ key: 'index', label: '序号', className: 'bill-table__col--index' },
{ key: 'planName', label: '账单名称', className: 'bill-table__col--name' },
@@ -148,17 +145,14 @@ const COLUMNS = [
</template>
<style lang="less" scoped>
// 设计 30:表头 (77.5,344.5) 1765×41.77 底 #F1F3F5;行高 43.77;文字 12px #4B5563
.bill-table {
width: 1765px;
margin: 6.5px 0 0 14.5px; // 表头 x77.5 / y344.5,卡片内缘 x71 / y338
margin: 6.5px 0 0 14.5px;
border-collapse: collapse;
table-layout: fixed;
font-size: 12px;
color: @finance-entry-text;
// 列宽按设计表头 x 递推(表头起点 x78,实宽 1765):
// 序号 x121.5|账单名称 x384.9|账单号 x695.09|流水 x843.12|项目 x1237.19|金额 x1576.6|状态 x1673.6|操作 x1768.6
&__col--check { width: 51px; }
&__col--index { width: 235.4px; }
&__col--name { width: 310.2px; }
@@ -180,31 +174,28 @@ const COLUMNS = [
text-overflow: ellipsis;
box-sizing: border-box;
// 单元格统一左内缩 10(除已单独指定的列)
&:not(&--check):not(&--ops) {
padding-left: 10px;
}
&--check {
padding-left: 43.5px; // 勾选框/序号文字 x121.5 → 表头起点 78
padding-left: 43.5px;
}
// 操作列内层 flex 已负责右对齐;单元格本身只管纵向居中
&--ops {
padding-right: 22px;
text-align: right;
}
}
// 各列文字起点对齐设计 x(表头起点 78):内缩 = 设计 x − 列起点
@col-pad-1: 43.5px; // 序号 121.5
@col-pad-2: 149.9px; // 账单名称 384.9
@col-pad-3: 8px; // 账单号 695.09
@col-pad-4: 17px; // 流水号 843.12
@col-pad-5: 5px; // 项目名称 1237.19
@col-pad-6: 14.6px; // 订单金额 1576.6
@col-pad-7: 4.6px; // 状态 1673.6
@col-pad-8: 6px; // 操作 1768.6(右对齐由内层 flex 兜)
@col-pad-1: 43.5px;
@col-pad-2: 149.9px;
@col-pad-3: 8px;
@col-pad-4: 17px;
@col-pad-5: 5px;
@col-pad-6: 14.6px;
@col-pad-7: 4.6px;
@col-pad-8: 6px;
thead &__cell,
tbody &__cell {
@@ -253,7 +244,6 @@ const COLUMNS = [
}
&__link {
// 设计:操作列起点 1746,末位「详情」右缘 1820.36 → 单元格右缘 1842.5
padding: 0;
border: none;
background: transparent;
@@ -262,7 +252,6 @@ const COLUMNS = [
font-weight: 400;
transition: color 0.2s;
// 「去支付」「详情」并排:设计文字盒距 18.36
+ .bill-table__link {
margin-left: 18.36px;
}

View File

@@ -3,26 +3,12 @@ import { computed } from 'vue'
import type { Bill } from '@/types/business/finance'
import { formatMoney } from '@/utils/format'
/**
* 收银台「订单明细」卡。
*
* <p>结构:卡标题「订单明细」→ 每笔账单一条**描边内嵌行**(期次名 / 账单号 / 关联项目 + 右侧金额)
* → 底部「已选 N笔订单,合计」+ 橙色合计金额。</p>
*
* <p>多笔账单时内嵌行依次堆叠(原型只画了 1 笔,这里按同一规格扩展)。</p>
*
* <p>⚠️ 字号/内边距按 **Web(桌面)** 尺度取值,不再是移动端设计稿那套:
* 卡标题 16px/600 与同目录 `PayMethodDialog`、`FinanceChart`、`WechatQrDialog` 对齐;
* 内嵌行内边距 16×18、字段行 12px、金额 16px、合计 20px/700。</p>
*/
interface Props {
/** 待支付账单(一笔或多笔合并支付) */
bills: Bill[]
}
const props = defineProps<Props>()
/** ⚠️ 金额可能以字符串下发(BigDecimal 序列化)⇒ 必须 Number() 归一,否则 reduce 会拼字符串 */
const totalAmount = computed(() =>
props.bills.reduce((sum, bill) => sum + Number(bill.amount || 0), 0),
)
@@ -74,13 +60,11 @@ const totalAmount = computed(() =>
&__list {
.flex(column, flex-start);
// `.flex()` 的 align 默认 center,会让内嵌行按内容宽度收缩 ⇒ 这里必须显式拉满
align-items: stretch;
gap: @spacing-sm;
margin-top: @spacing-base;
}
// 描边内嵌行(移动端设计稿实取描边 #e1e1e1、圆角约 7 设计px ≈ 10px)
&__item {
.flex(row, space-between, center);
gap: @spacing-base;
@@ -92,7 +76,6 @@ const totalAmount = computed(() =>
&__main {
.flex(column, flex-start);
// 同上:期次名 / 账单号 / 关联项目 必须左对齐,不能居中
align-items: flex-start;
gap: @spacing-xs;
min-width: 0;

View File

@@ -15,7 +15,6 @@ const props = defineProps<Props>()
const total = computed(() => props.distribution.reduce((sum, item) => sum + item.value, 0))
/** CSS conic-gradient(无图表库):按 value 占比切分色环(本页隐藏,仅保留绑定) */
const gradient = computed(() => {
if (total.value <= 0) return 'conic-gradient(#e4e7ec 0% 100%)'
let acc = 0
@@ -32,9 +31,7 @@ function percentOf(value: number): number {
return Math.round((value / total.value) * 100)
}
/** 设计稿 Y 轴刻度(等距 5 档) */
const AXIS = [250, 200, 150, 100, 50]
/** 设计稿 X 轴月份刻度 */
const MONTHS = ['1月', '2月', '3月', '4月', '5月']
</script>
@@ -45,7 +42,6 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
</h3>
<div class="finance-chart__body">
<!-- Y 轴刻度 10/400 #9CA3AF -->
<ul class="finance-chart__axis" aria-hidden="true">
<li v-for="v in AXIS" :key="v" class="finance-chart__axis-item">
{{ v }}
@@ -53,7 +49,6 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
</ul>
<div class="finance-chart__plot">
<!-- 5 条横向网格线(设计 #EDEFF2,1px) -->
<div class="finance-chart__grid" aria-hidden="true">
<i v-for="v in AXIS" :key="v" class="finance-chart__line" />
</div>
@@ -67,10 +62,8 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
/>
</div>
<!-- 数据源色环:设计稿为柱状图,此处仅保留绑定(隐藏)以免游离变量 -->
<div class="finance-chart__pie" :style="{ background: gradient }" />
<!-- X 轴 11/400 #6B7280 -->
<ul class="finance-chart__months" aria-hidden="true">
<li v-for="m in MONTHS" :key="m" class="finance-chart__month">
{{ m }}
@@ -92,16 +85,11 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
</template>
<style lang="less" scoped>
// 设计 6cd4aa76:图表卡 (70,344) 1780×378、白底 + #F0F1F3 描边;
// 标题 ink (82,367) 15/700 #1F2937(竖条 4×20 @#024FFF);
// Y 轴刻度 ink100 (103,403/461.5/520/578.5/637) 10/400 #9CA3AF,等距 58.5;
// 网格线 x137..1823 宽 1686 @408/466.5/525/583.5/642;X 轴月份 ink100 y649 11/400;
// 图例 ink100 y684(互联网软件 x809 / 物联网全案 x903 / 硬件电路 x997 / 生产制造 x1080)11/400
.finance-chart {
position: relative;
height: 378px; // 设计 6cd4aa76:图表卡 (70,344) 1780×378
margin-top: 14px; // 概览行底 330 → 图表卡顶 344
padding: 23px 23px 0; // 标题 ink y367 → 卡内 23(含 1px 描边);左右 x82 → 卡内 12
height: 378px;
margin-top: 14px;
padding: 23px 23px 0;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
@@ -128,18 +116,16 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
}
}
// 绘图区:标题盒底 387 → 首条网格线 408(21)
&__body {
.flex(row, flex-start, flex-start);
gap: 0;
margin-top: 21px;
}
// Y 轴刻度列:刻度 ink x103(卡内 33)→ 网格线 x137(卡内 67)
&__axis {
.flex(column, space-between, flex-start);
width: 34px;
height: 234px; // 网格线 408 → 642(5 档 4 段,段距 58.5)
height: 234px;
margin: 0;
padding: 0;
list-style: none;
@@ -151,7 +137,7 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
font-weight: 400;
line-height: 14px;
color: @finance-axis-text;
transform: translateY(-7px); // 刻度 ink 与网格线同一 y 对齐(去掉行盒偏移)
transform: translateY(-7px);
}
&__plot {
@@ -188,12 +174,10 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
background: @finance-chart-bar;
}
// 设计稿无色环:绑定保留但不参与展示
&__pie {
display: none;
}
// X 轴月份:网格线底 642 → 月份 ink 649(行盒顶 645)
&__months {
.flex(row, space-around, flex-start);
position: absolute;
@@ -212,12 +196,11 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
color: @finance-muted-text;
}
// 图例:月份盒底 662 → 图例 ink 684(行盒顶 681)
&__legend {
.flex(row, flex-start, center);
gap: 27px;
margin: 41px 0 0;
padding: 0 0 0 662px; // 图例首项 ink x809 → 卡内 692(轴 34 + 网格起点)
padding: 0 0 0 662px;
list-style: none;
}

View File

@@ -16,7 +16,6 @@ const emit = defineEmits<{
<template>
<div class="finance-overview">
<!-- 卡内文字块:相对卡顶 26(设计 221 − 195) -->
<div class="finance-overview__main">
<p class="finance-overview__label">
累计消费总额
@@ -26,7 +25,6 @@ const emit = defineEmits<{
</p>
</div>
<!-- 右上角「2026年账单 ›」 -->
<button class="finance-overview__period-link" @click="emit('periodChange', 'year')">
{{ stats?.month || '2026年账单' }}
<span aria-hidden="true">›</span>
@@ -35,8 +33,6 @@ const emit = defineEmits<{
</template>
<style lang="less" scoped>
// 设计 6cd4aa76:渐变卡 (70,195) 1093.84×135;标签 (100,221) 13/400 #FFFFFF;
// 金额 (100,254) 38/700;右上角「2026年账单 ›」(1066.98,220) 11/500
.finance-overview {
position: relative;
flex: 1 1 auto;
@@ -48,8 +44,8 @@ const emit = defineEmits<{
&__main {
.flex(column, flex-start, flex-start);
padding: 26px 0 0 30px; // 标签 ink (100,221) → 卡内 (30,26)
gap: 16px; // 标签盒底 238 → 金额盒顶 254
padding: 26px 0 0 30px;
gap: 16px;
}
&__label {
@@ -66,7 +62,6 @@ const emit = defineEmits<{
color: @white;
}
// 右上角链接:设计 x1066.98 y220 → 卡内右缘 27、顶 25
&__period-link {
position: absolute;
top: 25px;

View File

@@ -15,7 +15,6 @@ const emit = defineEmits<{
</script>
<template>
<!-- 设计 35/36:整幅宽卡——左侧「默认抬头」蓝胶囊,右侧操作按钮;下方三栏字段 -->
<div class="invoice-title-card">
<div class="invoice-title-card__top">
<span v-if="invoiceTitle.isDefault" class="invoice-title-card__badge">默认抬头</span>
@@ -54,27 +53,24 @@ const emit = defineEmits<{
</template>
<style lang="less" scoped>
// 设计 35:卡片 (70,229) 1780×129 / (70,372) 1780×88
.invoice-title-card {
display: flex;
flex-direction: column;
gap: 0;
width: 1780px;
min-height: 88px;
padding: 0 33.56px 0 27px; // 徽标 x98.58、按钮右缘 1820.6(卡内 1750.6)
padding: 0 33.56px 0 27px;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
box-sizing: border-box;
// 顶行:徽标 (98.58,249) 88.17×22 + 操作按钮 (1632.4,277.5) 各 12/500
&__top {
.flex(row, space-between, center);
height: 49px; // 徽标盒 y249(卡顶 229 + 20 居中)
height: 49px;
flex-shrink: 0;
}
// 「默认抬头」胶囊:蓝底白字 11/500
&__badge {
.flex(row, center, center);
height: 22px;
@@ -91,7 +87,6 @@ const emit = defineEmits<{
height: 22px;
}
// 操作按钮:纯文字 12/500 #4B5563,盒距 20.8(文字盒 67.2/43.2/43.2 + 间隔 4)
&__actions {
.flex(row, flex-end, center);
gap: 24px;
@@ -112,17 +107,16 @@ const emit = defineEmits<{
}
}
// 三栏:列起点(卡内,卡 x70 → 内容 x97/579/1061)= 0 / 482 / 964
&__cols {
.flex(row, flex-start, flex-start);
gap: 0;
padding-top: 2px; // 顶行 59 → 标签 ink y293(卡内 64)
padding-bottom: 30px; // 值底 y335(卡内 106)→ 卡底 358
padding-top: 2px;
padding-bottom: 30px;
}
&__col {
.flex(column, flex-start, flex-start);
gap: 8px; // 标签 ink 293 → 值 ink 316
gap: 8px;
width: 482px;
box-sizing: border-box;

View File

@@ -2,21 +2,7 @@
import type { PayMethod } from '@/types/business/finance'
import { PAY_METHODS } from '@/utils/payMeta'
/**
* 收银台「选择支付方式」卡。
*
* <p>结构:卡头「选择支付方式」+ 下方两行支付方式**满宽铺满卡片**(选中行整行底色点亮,
* 微信 = 浅绿),右侧圆形单选钮。</p>
*
* <p>⚠️ 卡头**不带序号徽标**:早期按移动端设计稿做过一个黄色方形「1」,
* 与原型 `docs/prototype/财务中心-演示.html` 的「选择支付方式」弹窗(只有标题 + × 关闭)
* 不一致,已按用户要求删除。</p>
*
* <p>⚠️ 字号/尺寸按 **Web(桌面)** 尺度取值:卡标题 16px/600(与同目录 `PayMethodDialog` 对齐)、
* 行高 72px、图标 40px、单选钮 20px —— 不再沿用移动端设计稿那套 57px 行高 / 32px 图标。</p>
*/
interface Props {
/** 当前选中的支付方式 */
modelValue: PayMethod
}
@@ -53,7 +39,6 @@ function select(value: PayMethod): void {
@keydown.space.prevent="select(item.value)"
>
<span class="pay-method__icon" :class="`pay-method__icon--${item.value}`" aria-hidden="true">
<!-- 微信:绿底白双气泡 -->
<svg
v-if="item.value === 'wechat'"
class="pay-method__logo"
@@ -74,7 +59,6 @@ function select(value: PayMethod): void {
<circle class="pay-method__eye" cx="19" cy="20" r="1.3" />
<circle class="pay-method__eye" cx="24" cy="20" r="1.3" />
</svg>
<!-- 支付宝:蓝底白「支」 -->
<template v-else>支</template>
</span>
@@ -98,7 +82,6 @@ function select(value: PayMethod): void {
background: @checkout-card;
overflow: hidden;
// 卡头:与「订单明细」卡标题同规格(左右内边距与卡内其它内容对齐)
&__head {
padding: @spacing-lg @spacing-lg @spacing-base;
}
@@ -109,7 +92,6 @@ function select(value: PayMethod): void {
color: @heading-color;
}
// 支付方式行:满宽铺满卡片(移动端设计稿实取 x 5..242 = 整卡宽)
&__row {
.flex(row, flex-start, center);
gap: @spacing-base;
@@ -157,7 +139,6 @@ function select(value: PayMethod): void {
fill: @white;
}
// 前景气泡描边取图标底色 → 与后景气泡之间留出白-绿分隔缝
&__bubble-front {
fill: @white;
stroke: @checkout-wechat;
@@ -170,7 +151,6 @@ function select(value: PayMethod): void {
&__text {
.flex(column, flex-start);
// `.flex()` 的 align 默认 center,会让「名称 / 副标题」各自居中 ⇒ 必须显式左对齐
align-items: flex-start;
gap: 2px;
flex: 1;
@@ -198,7 +178,6 @@ function select(value: PayMethod): void {
flex-shrink: 0;
transition: all 0.2s;
// 选中:实心圆 + 白色对勾
&.is-checked::after {
content: '';
position: absolute;

View File

@@ -4,23 +4,10 @@ import qrcode from 'qrcode-generator'
import { useCountDown } from '@/composables/useCountDown'
import { formatMoney } from '@/utils/format'
/**
* 微信 Native 支付二维码弹窗。
*
* <p>后端 `/pay/web/wechat/native` 返回 `codeUrl`(形如 `weixin://wxpay/bizpayurl?pr=xxx`),
* 本组件用 `qrcode-generator` 把它渲染成二维码(`createSvgTag` → `v-html`),
* 用户用微信「扫一扫」完成支付。</p>
*
* <p>⚠️ 后端**没有「查询支付结果」接口**,所以没有轮询——付完由用户点「我已完成支付」
* 进入支付结果页;二维码倒计时只是展示(Native 侧 `code_url` 真实有效期由微信控制)。</p>
*/
interface Props {
visible: boolean
/** 二维码内容(微信 codeUrl) */
content: string
/** 订单金额(元) */
amount: number
/** 二维码倒计时(秒),默认 5 分钟 */
expiresIn?: number
}
@@ -28,9 +15,7 @@ const props = withDefaults(defineProps<Props>(), { expiresIn: 300 })
const emit = defineEmits<{
'update:visible': [visible: boolean]
/** 重新下单换一张二维码 */
refresh: []
/** 用户声明已付款 */
paid: []
}>()
@@ -45,7 +30,6 @@ const countdownText = computed(() => {
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`
})
/** 内容仅来自后端下发的 codeUrl,本地生成 SVG,非用户输入 */
const qrSvg = computed(() => {
if (!props.content) return ''
try {
@@ -105,7 +89,6 @@ function onBoxClick(): void {
:class="{ 'is-expired': expired }"
@click="onBoxClick"
>
<!-- eslint-disable-next-line vue/no-v-html -- 内容由本地 QR 库生成,非用户输入 -->
<div v-if="!expired && qrSvg" class="wx-qr__code" v-html="qrSvg" />
<div v-else class="wx-qr__mask">
<span class="wx-qr__mask-icon">⟳</span>
@@ -185,7 +168,6 @@ function onBoxClick(): void {
height: 100%;
padding: @spacing-sm;
// v-html 注入的 SVG 拿不到 scoped 属性,必须 :deep
:deep(svg) {
display: block;
width: 100%;

View File

@@ -5,7 +5,6 @@ import { storeToRefs } from 'pinia'
import { RouterLink } from 'vue-router'
import { ElMessage } from 'element-plus'
import { PageHead } from '@/components'
// 页面容器:只做组件组合与事件中转,数据只经 store
import { useFinanceStore } from '@/stores/modules/finance'
import FinanceChart from './cpns/FinanceChart.vue'
import FinanceOverview from './cpns/FinanceOverview.vue'
@@ -75,28 +74,22 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 财务中心概览(设计 6cd4aa76,1920 画布 1:1)
// 页头区 (70,162) 1780×17 副标语 13/400 #6B7280(标题 22/700 由全站页头统一渲染)
// 概览行 y195 h135:左渐变卡 1093.84 宽、右白卡 672.16 宽(间距 14)
// 图表卡 (70,344) 1780×378,白底 + #F0F1F3 描边
.finance {
width: 100%;
// 顶部行:左渐变卡 + 右快捷卡,间距 14
&__top {
.flex(row, flex-start, stretch);
gap: 14px;
margin-top: -56px; // 页头白条通栏高 179,卡片按设计压在 y195
margin-top: -56px;
}
// 右侧快捷入口白卡 672.16×135
&__entries {
.flex(row, space-between, center);
flex: 0 0 672px;
height: 135px;
padding: 0 34px;
border: 1px solid @finance-card-line;
border-radius: @radius-base; // 设计无圆角?——卡面 8 以内,与全站一致
border-radius: @radius-base;
background: @white;
box-sizing: border-box;
}

View File

@@ -3,7 +3,6 @@ import { computed, onMounted, ref } from 'vue'
import { storeToRefs } from 'pinia'
import { ElMessage } from 'element-plus'
import { ConfirmDialog } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { InvoiceTitle, InvoiceTitlePayload } from '@/types/business/finance'
import InvoiceTitleCard from './cpns/InvoiceTitleCard.vue'
@@ -25,7 +24,6 @@ const pageCount = computed(() => Math.max(1, Math.ceil(titles.value.length / PAG
const pagedTitles = computed(() =>
titles.value.slice((page.value - 1) * PAGE_SIZE, page.value * PAGE_SIZE),
)
/** 页码序列:设计 35 实取 1~5 */
const pages = computed(() => Array.from({ length: Math.max(5, pageCount.value) }, (_, i) => i + 1))
function go(next: number): void {
@@ -80,7 +78,6 @@ onMounted(() => {
<template>
<div class="invoice-titles">
<div class="container">
<!-- 面包屑 (70,124)「财务中心 /」13/400 #9CA3AF +「发票抬头管理」13/500 #4B5563 -->
<nav class="invoice-titles__breadcrumb">
<RouterLink to="/finance" class="invoice-titles__breadcrumb-link">
财务中心 /
@@ -88,7 +85,6 @@ onMounted(() => {
<span class="invoice-titles__breadcrumb-current">发票抬头管理</span>
</nav>
<!-- 标题条 (70,153) 1780×62:标题 x106 y174 15/700 + 右侧「+ 新增抬头」 -->
<header class="invoice-titles__head">
<h2 class="invoice-titles__title">
发票管理
@@ -98,7 +94,6 @@ onMounted(() => {
</button>
</header>
<!-- 抬头卡列表 (70,229) 起 1780×129 / (70,372) 1780×88 -->
<div class="invoice-titles__list">
<InvoiceTitleCard
v-for="item in pagedTitles"
@@ -113,7 +108,6 @@ onMounted(() => {
</p>
</div>
<!-- 分页 (1684.93~1881.07,505) 12/400 -->
<nav class="invoice-titles__pager" aria-label="分页">
<button class="invoice-titles__page" :disabled="page <= 1" @click="go(page - 1)">
‹
@@ -151,16 +145,14 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 35/36 发票抬头管理(1920 画布 1:1)——内容区 x70→1850 = 1780
.invoice-titles {
width: 100%;
padding-bottom: 459px; // 分页底 521 → 页脚 1087
padding-bottom: 459px;
background: @contract-page-bg;
// 面包屑 (70,124)
&__breadcrumb {
.flex(row, flex-start, center);
height: 81px; // 顶栏 72 → 标题条 153,面包屑盒 72..133
height: 81px;
padding-top: 36px;
font-size: 13px;
font-weight: 400;
@@ -178,16 +170,15 @@ onMounted(() => {
}
&__breadcrumb-current {
margin-left: 5.25px; // 「财务中心 /」墨迹宽 65.25 → 发票抬头管理 x135.25
margin-left: 5.25px;
color: @finance-entry-text;
font-weight: 500;
}
// 标题条 (70,153) 1780×62
&__head {
.flex(row, space-between, center);
height: 62px;
padding: 0 33.56px 0 36px; // 标题 x106;按钮右缘 1822
padding: 0 33.56px 0 36px;
border: 1px solid @finance-card-line;
border-radius: @radius-base;
background: @white;
@@ -201,11 +192,10 @@ onMounted(() => {
color: @finance-ink;
}
// 「+ 新增抬头」(1735.56,167) 110.44×34
&__create {
width: 110.44px;
height: 34px;
margin-right: -5px; // 按钮右缘 1822 → 卡内缩 33.56 得 1816.44,再右移 5
margin-right: -5px;
border: none;
border-radius: 4px;
background: @primary-strong;
@@ -219,11 +209,10 @@ onMounted(() => {
}
}
// 抬头卡纵排:首卡 (70,229)、次卡 (70,372) → 间距 14
&__list {
.flex(column, flex-start, stretch);
gap: 14px;
margin-top: 14px; // 标题条底 215 → 首卡 229
margin-top: 14px;
}
&__empty {
@@ -233,12 +222,11 @@ onMounted(() => {
text-align: center;
}
// 分页:右对齐到内容区右缘,页码 12/400
&__pager {
.flex(row, flex-end, center);
gap: 3.7px;
margin-top: 8px; // 次卡底 460 → 页码 ink 505
padding-right: 2.4px; // 末位「›」右缘 1881.07 → 内容右缘 1850
margin-top: 8px;
padding-right: 2.4px;
}
&__page {

View File

@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
import { RouterLink } from 'vue-router'
import { ElMessage } from 'element-plus'
import { FilterPanel, PaginationBar, StatusTag } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { Invoice, InvoiceStatus } from '@/types/business/finance'
import { formatMoney } from '@/utils/format'
@@ -220,7 +219,6 @@ onMounted(() => {
margin: 0 auto;
padding: @spacing-lg @spacing-base @spacing-xxl;
// 与财务中心其他页一致:面包屑 11px、前缀灰当前页深灰
&__breadcrumb {
font-size: 11px;
color: @text-color-disabled;

View File

@@ -2,7 +2,6 @@
import { computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import { formatMoney } from '@/utils/format'
@@ -13,7 +12,6 @@ const { result } = storeToRefs(financeStore)
const billId = computed(() => String(route.params.id))
/** 需求 id(收银台带过来):有它就走「需求 + 期次」的财务口径查支付结果 */
const requirementId = computed(() => {
const raw = route.query.requirementId
return String(Array.isArray(raw) ? raw[0] : (raw ?? '')).trim()
@@ -32,7 +30,6 @@ onMounted(() => {
<template>
<div class="pay-result">
<div class="container">
<!-- 面包屑 (67,95)「财务中心 / 账单明细 /」+「支付成功」13/500 #4B5563 -->
<nav class="pay-result__breadcrumb">
<RouterLink to="/finance" class="pay-result__crumb-link">
财务中心 /
@@ -44,28 +41,22 @@ onMounted(() => {
</nav>
<template v-if="result">
<!-- 主列 316 居中(设计 x799→1115) -->
<section class="pay-result__col">
<!-- 绿圆勾 (897,187) 120×120 #7ED321,✓ 56/400 白字居中 -->
<div class="pay-result__check" aria-hidden="true">
✓
</div>
<!-- 标题 (900.3,331) 22/700 #1F2937,字距 6 -->
<h2 class="pay-result__title">
支付成功
</h2>
<!-- 金额行 (852.9,379):13/400 灰 + ¥ 18/700 #EF4444,基线对齐 -->
<p class="pay-result__amount-row">
<span class="pay-result__amount-label">共{{ result.bills.length }}个订单 支付金额:</span>
<span class="pay-result__amount">¥ {{ formatMoney(result.amount, 0) }}</span>
</p>
<!-- 分割线 (799,428) 316×1 #F0F1F3 -->
<div class="pay-result__divider" />
<!-- 支付信息 (799,449) 13/700 -->
<h4 class="pay-result__sub-title">
支付信息
</h4>
@@ -96,7 +87,6 @@ onMounted(() => {
</div>
</dl>
<!-- 已支付订单 (799,574) 13/700 -->
<h4 class="pay-result__sub-title pay-result__sub-title--bills">
已支付订单
</h4>
@@ -119,7 +109,6 @@ onMounted(() => {
</li>
</ul>
<!-- 返回 (1031,711) 84×32 #024FFF 12/500 白字,右对齐 -->
<div class="pay-result__footer">
<button
class="pay-result__back"
@@ -140,13 +129,11 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计「支付成功」c56193d1(1920 画布 1:1)——316 居中窄列坐在页面底色上
.pay-result {
width: 100%;
padding-bottom: 344px; // 列底 743 → 页脚 1087
padding-bottom: 344px;
background: @contract-page-bg;
// 面包屑 (67,95):头部底 73 → 文字盒顶 95 = 22
&__breadcrumb {
.flex(row, flex-start, center);
padding-top: 22px;
@@ -166,17 +153,15 @@ onMounted(() => {
&__crumb-current {
margin-left: 3px;
color: @finance-entry-text; // 设计 #4B5563
color: @finance-entry-text;
font-weight: 500;
}
// 主列 316,居中(面包屑底 112 → 圆顶 187 = 75)
&__col {
width: 316px;
margin: 75px auto 0;
}
// 绿圆勾 120×120 #7ED321
&__check {
.flex(row, center, center);
width: 120px;
@@ -190,7 +175,6 @@ onMounted(() => {
line-height: 1;
}
// 标题:圆底 307 → 331 = 24;盒 113.3 ≈ 4×22 + 4×6 字距
&__title {
margin: 24px -6px 0 0;
text-align: center;
@@ -201,7 +185,6 @@ onMounted(() => {
color: @finance-ink;
}
// 金额行:标题底 360 → 374 = 14;13/400 灰 + 18/700 #EF4444 基线对齐
&__amount-row {
.flex(row, center, baseline);
margin-top: 14px;
@@ -218,11 +201,10 @@ onMounted(() => {
font-size: 18px;
font-weight: 700;
line-height: 24px;
color: @danger-color; // 设计 #EF4444
color: @danger-color;
white-space: nowrap;
}
// 分割线:金额行底 398 → 428 = 30
&__divider {
height: 1px;
margin-top: 30px;
@@ -230,18 +212,17 @@ onMounted(() => {
}
&__sub-title {
margin-top: 20px; // 线底 429 → 449 = 20
margin-top: 20px;
font-size: 13px;
font-weight: 700;
line-height: 17px;
color: @finance-ink;
&--bills {
margin-top: 22px; // 末行底 552 → 574 = 22
margin-top: 22px;
}
}
// 支付信息三行:标题底 466 → 首行 480 = 14;行高 16 步进 28 → gap 12
&__fields {
.flex(column, flex-start, stretch);
gap: 12px;
@@ -268,7 +249,6 @@ onMounted(() => {
word-break: break-all;
}
// 白卡:标题底 591 → 601 = 10;316×84 白底描边 #F0F1F3
&__bill-list {
.flex(column, flex-start, stretch);
margin-top: 10px;
@@ -314,15 +294,14 @@ onMounted(() => {
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: @project-muted; // 设计 #9CA3AF
color: @project-muted;
.ellipsis();
+ .pay-result__bill-meta {
margin-top: 0; // 账单号 638 → 关联项目 654 连排
margin-top: 0;
}
}
// 返回按钮:卡底 685 → 711 = 26,右对齐 84×32 #024FFF
&__footer {
.flex(row, flex-end, flex-start);
margin-top: 26px;

View File

@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { AppButton, QrCodePanel } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useFinanceStore } from '@/stores/modules/finance'
import type { PayMethod } from '@/types/business/finance'
import { formatMoney } from '@/utils/format'
@@ -74,7 +73,6 @@ onMounted(() => {
<span>扫码支付</span>
</nav>
<!-- 设计 33/34:单张大白卡——左(渠道说明 + 切换)/ 中(金额 + 二维码)/ 右(步骤 + 订单明细 + 安全提示) -->
<div class="pay__body card">
<section class="pay__left">
<div class="pay__left-top">
@@ -142,7 +140,6 @@ onMounted(() => {
</section>
</div>
<!-- 设计 33:操作按钮在大卡右下方 -->
<div class="pay__footer">
<AppButton type="primary" size="lg" @click="onPaid">
完成支付
@@ -167,7 +164,6 @@ onMounted(() => {
margin: 0 auto;
padding: @spacing-lg @spacing-base @spacing-xxl;
// 设计 33:面包屑 13 设计px → 11px,前缀灰、当前页深灰
&__breadcrumb {
margin-bottom: @spacing-base;
font-size: 11px;
@@ -178,7 +174,6 @@ onMounted(() => {
}
}
// 设计 33:整页单张大白卡,左中右三区
&__body {
.flex(row, flex-start, flex-start);
gap: 24px;
@@ -195,7 +190,6 @@ onMounted(() => {
gap: @spacing-base;
}
// 左区顶行:渠道说明靠左、切换支付方式胶囊靠右(设计 33 右上角)
&__left-top {
.flex(row, space-between, center);
align-self: stretch;
@@ -230,7 +224,6 @@ onMounted(() => {
}
}
// 中区:支付金额标签 15 设计px → 12px,金额 34 设计px → 26px 粗体红
&__amount-block {
text-align: center;
}
@@ -248,14 +241,12 @@ onMounted(() => {
line-height: 1.2;
}
// 二维码占位(QrCodePanel 内部压成设计稿的灰色方块)
:deep(.qr-panel__box) {
border: none;
background: @contract-qr-bg;
border-radius: @radius-base;
}
// 倒计时行 → 浅红胶囊(设计 33「二维码将在 04:32 后失效」)
:deep(.qr-panel__status) {
font-size: 11px;
color: @danger-color;
@@ -269,7 +260,6 @@ onMounted(() => {
font-weight: 700;
}
// 右区:步骤 + 订单明细 + 安全提示(设计 33 右列 400 设计px ≈ 310px)
&__right {
flex: 0 0 310px;
display: flex;
@@ -283,7 +273,6 @@ onMounted(() => {
font-weight: 700;
color: @heading-color;
// 「订单明细」小节按设计 33 降为 13 设计px → 11px
}
&__detail &__sub-title {
@@ -294,7 +283,6 @@ onMounted(() => {
font-size: 15px;
}
// 三步指引:序号实底蓝圆 024FFF,步骤文字 14 设计px → 11px
&__step-list {
.flex(column, flex-start, stretch);
gap: 12px;
@@ -323,7 +311,6 @@ onMounted(() => {
flex-shrink: 0;
}
// 订单明细:浅灰底板 + 白底行卡(设计 33 实取 #F7F8F9 / #FFFFFF)
&__detail-list {
.flex(column, flex-start, stretch);
gap: 6px;
@@ -356,7 +343,6 @@ onMounted(() => {
color: @danger-color;
}
// 安全提示横幅:浅绿底 + 绿字(设计 33 实取 #D2EEDC / #16A34A)
&__safe {
padding: 8px 12px;
border-radius: @radius-sm;
@@ -367,7 +353,6 @@ onMounted(() => {
line-height: 1.6;
}
// 卡下操作区:右对齐(设计 33 返回按钮在卡右下)
&__footer {
.flex(row, flex-end, center);
gap: @spacing-base;

View File

@@ -5,19 +5,11 @@ import { useHomeStore } from '@/stores/modules/home'
import type { PortalEntryCard, PortalEntryGroup } from '@/types/business/home'
import { toPortalEntryCards } from '@/utils/entryIcon'
/**
* 「更多应用」弹窗:快捷入口 / 其他入口 两组,图标角标可把入口在两组之间互转。
*
* 数据来自 store.quickEntries / store.otherEntries(← /vermins/portalEntryUser/list)。
* 接口不可用(游客、无权限)时回退到内置默认入口,保证弹窗不空。
*/
const visible = defineModel<boolean>('visible', { default: false })
const homeStore = useHomeStore()
const router = useRouter()
/** 接口不可用时的默认快捷入口(与首页卡片一致的固定模块) */
const FALLBACK_QUICK: Array<Pick<PortalEntryCard, 'label' | 'route' | 'icon' | 'tone'>> = [
{ label: '财务台账', route: '/finance/bills', icon: '💰', tone: 'amber' },
{ label: '合同台账', route: '/contract', icon: '📄', tone: 'blue' },
@@ -26,10 +18,8 @@ const FALLBACK_QUICK: Array<Pick<PortalEntryCard, 'label' | 'route' | 'icon' | '
{ label: '工单需求池', route: '/demand', icon: '📋', tone: 'cyan' },
]
/** 前端已注册的静态路由集合(用于判断入口 route 是否可跳转) */
const knownPaths = computed(() => new Set(router.getRoutes().map((item) => item.path)))
/** 快捷入口组 */
const quickCards = computed<PortalEntryCard[]>(() => {
const list = toPortalEntryCards(homeStore.quickEntries)
if (list.length > 0) return list
@@ -41,34 +31,28 @@ const quickCards = computed<PortalEntryCard[]>(() => {
}))
})
/** 其他入口组 */
const otherCards = computed<PortalEntryCard[]>(() => toPortalEntryCards(homeStore.otherEntries))
/** 入口是否可点击跳转(route 为空或未注册时不跳,避免落到 404) */
function canOpen(card: PortalEntryCard): boolean {
return card.route.length > 0 && knownPaths.value.has(card.route)
}
/** 是否是后端下发的入口(默认兜底入口 id 为 0,不可切换分组) */
function switchable(card: PortalEntryCard): boolean {
return card.id > 0
}
/** 点击图标:跳转对应路由 */
function onOpen(card: PortalEntryCard): void {
if (!canOpen(card)) return
visible.value = false
void router.push(card.route)
}
/** 点击角标:快捷 ⇄ 其他 互转 */
async function onToggle(card: PortalEntryCard): Promise<void> {
if (!switchable(card)) return
const target: PortalEntryGroup = card.groupType === '1' ? '0' : '1'
try {
await homeStore.switchEntryGroup(card.id, target)
} catch {
// 失败提示已由请求层统一弹出,这里只保证不产生未捕获的 rejection
}
}
@@ -249,7 +233,6 @@ function onClose(): void {
box-shadow: @shadow-base;
}
// tone 底色与首页快捷入口一致(按蓝湖设计稿采样)
&--purple {
background: @home-quick-purple;
}

View File

@@ -12,7 +12,6 @@ const router = useRouter()
const activeIndex = ref(0)
let timer: ReturnType<typeof setInterval> | null = null
/** 接口无图时用设计稿插画兜底,保证头图始终有一层视觉 */
const slides = computed(() => {
if (props.banners.length > 0) {
return props.banners.map((item) => item.imageUrl)
@@ -58,7 +57,6 @@ onBeforeUnmount(stopAutoplay)
<template>
<section class="home-banner">
<!-- 底层:图片轮播(文案层始终叠在其上) -->
<div class="home-banner__carousel" aria-hidden="true">
<div
v-for="(src, index) in slides"
@@ -70,7 +68,6 @@ onBeforeUnmount(stopAutoplay)
</div>
</div>
<!-- 顶层:标题 / 副标题 / 按钮,轮播切换时位置不变 -->
<div class="home-banner__inner">
<h1 class="home-banner__title">虫子智造研发一体化平台</h1>
<p class="home-banner__subtitle">一站式智能软硬件研发与量产综合服务商</p>
@@ -109,7 +106,6 @@ onBeforeUnmount(stopAutoplay)
width: 100%;
flex: 0 0 auto;
// 底层轮播:通栏铺满,文案层叠在上面
&__carousel {
position: absolute;
inset: 0;
@@ -134,7 +130,6 @@ onBeforeUnmount(stopAutoplay)
object-fit: cover;
}
// 顶层文案:相对内容区定位,不随轮播切换
&__inner {
position: relative;
z-index: 1;
@@ -145,7 +140,6 @@ onBeforeUnmount(stopAutoplay)
pointer-events: none;
}
// 设计稿标题 x150 y257(画板绝对)→ banner 内 y257−73=184
&__title {
position: absolute;
top: 184px;
@@ -158,7 +152,6 @@ onBeforeUnmount(stopAutoplay)
white-space: nowrap;
}
// 设计稿副标题 x150 y360 → banner 内 y287
&__subtitle {
position: absolute;
top: 287px;
@@ -171,7 +164,6 @@ onBeforeUnmount(stopAutoplay)
white-space: nowrap;
}
// 设计稿按钮组 x150 y465 → banner 内 y392;两钮 183×55,间距 20
&__actions {
position: absolute;
top: 392px;

View File

@@ -12,7 +12,6 @@ interface Props {
defineProps<Props>()
// 设计稿四张卡的插画图案(81×111,蓝湖整稿切图);接口 logoUrl 优先
const FALLBACK_ILL: Record<BusinessType, string> = {
internet: illInternet,
hardware: illHardware,
@@ -34,13 +33,11 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
class="home-business__card"
:class="`home-business__card--${line.id}`"
>
<!-- 设计稿:插画 81×111 @卡内(48,4);接口 logoUrl 优先,静态切图兜底 -->
<img
class="home-business__ill"
:src="line.icon || FALLBACK_ILL[line.id]"
:alt="line.name"
/>
<!-- 设计稿卡片右上角选择圆环(31×31) -->
<span class="home-business__check" aria-hidden="true" />
<h4 class="home-business__name">
{{ line.name }}
@@ -55,15 +52,13 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
<style lang="less" scoped>
.home-business {
// 设计稿区块卡 1680×400:白底 + #E2E2E2 描边,标题 @190,1062(卡顶 +44),卡区左右距 70
padding: 44px 70px 54px;
border: 1px solid @home-section-border;
border-radius: @radius-lg;
background: @white;
&__title {
margin: 0 0 47px; // 标题盒底 1114 → 卡顶 1161
// 设计稿栏目标题 36px / 700 / #121212
margin: 0 0 47px;
font-size: @font-size-xxl;
font-weight: 700;
color: @home-ink;
@@ -71,14 +66,12 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
&__grid {
display: flex;
// 一行固定四张,窄视口行内等比收缩(wrap 会因 1px 之差把第四张挤到第二行)
gap: 22px;
}
&__card {
position: relative;
.flex(column, flex-start, flex-start);
// 设计稿业务卡 368×206,一行固定四张(4×368 + 3×22 = 1538 ≤ 1560)
flex: 0 1 368px;
min-width: 0;
height: 206px;
@@ -97,7 +90,6 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
}
}
// 设计稿插画 81×111 @卡内 (48,4)
&__ill {
position: absolute;
top: 4px;
@@ -107,7 +99,6 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
object-fit: contain;
}
// 右上角选择圆环(31×31)
&__check {
position: absolute;
top: 24px;
@@ -131,10 +122,8 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
}
}
// 设计稿标题 @卡内 (20,106),描述 @ (20,151)
&__name {
margin: 106px 0 0;
// 设计稿卡片标题 28px / 500 / #121212
font-size: @font-size-title;
font-weight: 500;
line-height: 41px;
@@ -150,7 +139,6 @@ const FALLBACK_ILL: Record<BusinessType, string> = {
.multi-ellipsis(1);
}
// 设计稿:首张「互联网软件」为 #024FFF 选中实底 + 白字白环;其余白底描边
&__card--internet {
border-color: @primary-strong;
background: @primary-strong;

View File

@@ -27,7 +27,6 @@ function switchCategory(value: BusinessType | 'all'): void {
emit('categoryChange', value)
}
// 设计稿一行固定四张 368×248,最多展示四张
const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
</script>
@@ -86,7 +85,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
<style lang="less" scoped>
.home-cases {
// 设计稿区块卡 1680×446:白底 + #E2E2E2 描边,标题 @1478(卡顶 +40),卡区左右距 66
padding: 40px 66px 60px;
border: 1px solid @home-section-border;
border-radius: @radius-lg;
@@ -95,11 +93,10 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__head {
.flex(row, flex-start);
gap: 24px;
margin-bottom: 47px; // 标题盒底 1530 → 卡顶 1577
margin-bottom: 47px;
}
&__title {
// 设计稿栏目标题 36px / 700 / #121212
font-size: @font-size-xxl;
font-weight: 700;
color: @home-ink;
@@ -107,7 +104,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__tabs {
.flex(row, center);
// 设计稿分类紧跟标题左侧排布(间距 36px)
gap: 36px;
}
@@ -117,7 +113,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
padding: 0;
border: 0;
background: transparent;
// 设计稿分类 16px / 500 / #121212(激活 #085DFF + 下划线)
color: @home-ink;
font-size: @font-size-md;
font-weight: 500;
@@ -127,7 +122,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
background: transparent;
color: @home-tab-active;
// 设计稿激活下划线 29×2(#1F67EF)
&::after {
content: '';
position: absolute;
@@ -147,18 +141,15 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__grid {
display: flex;
// 一行固定四张(4×368 + 3×24 = 1544),窄视口行内等比收缩
gap: 24px;
}
&__card {
overflow: hidden;
// 设计稿案例卡固定 368×248,一行四张(4×368 + 3×24 = 1544 ≤ 1560),不足四张不放大
flex: 0 1 368px;
min-width: 0;
height: 248px;
box-sizing: border-box;
// 设计稿案例卡 368×248:白底 + #E0DEDE 描边 + 0 4 10 黑 8% 投影
border: 1px solid @home-case-border;
border-radius: @radius-base;
background: @white;
@@ -178,7 +169,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__cover {
position: relative;
// 设计稿封面区 88px 高(卡 248:封面 0-88,标题 @109,属性行 @174/194,查看详情 @220)
height: 88px;
overflow: hidden;
}
@@ -199,7 +189,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__name {
margin: 21px 0 0;
// 设计稿案例名 16px / 500 / #333333
font-size: @font-size-md;
font-weight: 500;
line-height: 22px;
@@ -209,7 +198,6 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__meta {
display: grid;
// 设计稿属性行 13px 两行三列(行1 @174、行2 @194,行高 20)
grid-template-columns: 1fr 1fr 1fr;
gap: 0 @spacing-lg;
margin-top: 43px;
@@ -225,11 +213,9 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
&__view {
display: block;
width: fit-content;
// 设计稿「查看详情>」@卡内 y220(13px),右下角
margin: 6px 0 0 auto;
padding: 0;
border: 0;
// 设计稿「查看详情>」13px / #024FFF(无按钮描边)
color: @primary-strong;
font-size: 13px;
line-height: 15px;

View File

@@ -12,21 +12,12 @@ import tileService from '@/assets/home/entry-service.png'
import tileContract from '@/assets/home/entry-contract.png'
import tileFinance from '@/assets/home/entry-finance.png'
/**
* 首页右上「业务服务」入口卡(设计稿标题即「业务服务」,与下方栏位同名)。
*
* 数据来自 store.quickEntries(← /vermins/portalEntryUser/list 的 groupType=1 项),
* 接口不可用(游客 / 无权限)时回退到内置默认入口,保证卡片不空。
* 设计稿固定五个入口,接口返回的多余项(如硬件 / 互联 / 其他)不展示。
* 「>>」双箭头打开 HomeAppDialog,可在快捷 / 其他两组之间调整入口。
*/
const homeStore = useHomeStore()
const { quickEntries } = storeToRefs(homeStore)
const router = useRouter()
const dialogVisible = ref(false)
/** 设计稿固定入口名目(设计稿没有的接口入口不展示) */
const DESIGN_NAMES = [
'工单需求池',
'案例库管理',
@@ -35,7 +26,6 @@ const DESIGN_NAMES = [
'财务台账',
]
/** 接口不可用时的默认入口(与设计稿五项一致,tone 对应设计稿五色) */
const FALLBACK_QUICK: PortalEntryCard[] = [
{
id: 0,
@@ -84,7 +74,6 @@ const FALLBACK_QUICK: PortalEntryCard[] = [
},
]
/** 设计稿切图:蓝湖整稿 97×97 方块(含底色与白色图案),按入口名映射 */
const DESIGN_TILES: Record<string, string> = {
工单需求池: tileDemand,
案例库管理: tileCases,
@@ -93,10 +82,8 @@ const DESIGN_TILES: Record<string, string> = {
财务台账: tileFinance,
}
/** 前端已注册的静态路由(route 无效时不跳转,避免出现无匹配路由) */
const knownPaths = new Set(router.getRoutes().map((item) => item.path))
/** 卡片展示的入口:接口数据按设计稿名目过滤,最多 5 个 */
const entries = computed<PortalEntryCard[]>(() => {
const list = toPortalEntryCards(quickEntries.value).filter((card) =>
DESIGN_NAMES.includes(card.label),
@@ -104,14 +91,12 @@ const entries = computed<PortalEntryCard[]>(() => {
return (list.length > 0 ? list : FALLBACK_QUICK).slice(0, 5)
})
/** 入口图:接口 iconUrl 图案优先,否则设计稿切图 */
function tileSrc(card: PortalEntryCard): string {
return card.isImage && card.icon
? card.icon
: (DESIGN_TILES[card.label] ?? '')
}
/** 解析可跳转路径:优先后端 route,其次同名默认入口,最后回首页 */
function resolvePath(card: PortalEntryCard): string {
if (card.route && knownPaths.has(card.route)) return card.route
const fallback = FALLBACK_QUICK.find((item) => item.label === card.label)
@@ -120,7 +105,6 @@ function resolvePath(card: PortalEntryCard): string {
}
function onMore(): void {
// 打开时同步一次,确保分组是后端最新结果
void homeStore.fetchPortalEntries()
dialogVisible.value = true
}
@@ -139,7 +123,6 @@ function onMore(): void {
:to="resolvePath(entry)"
class="home-quick__item"
>
<!-- 设计稿:97×97 彩色方块 + 白色图案(蓝湖整稿切图),接口 iconUrl 图案优先 -->
<img
class="home-quick__tile"
:src="tileSrc(entry)"
@@ -148,7 +131,6 @@ function onMore(): void {
<span class="home-quick__label">{{ entry.label }}</span>
</RouterLink>
<!-- 设计稿:双箭头图标与入口方块行垂直居中(@y875, 32×32,距末位方块 20) -->
<button
class="home-quick__more"
type="button"
@@ -191,12 +173,9 @@ function onMore(): void {
position: relative;
.flex(column, flex-start, stretch);
flex-shrink: 0;
// 设计稿右卡 722 宽;白底 + 浅灰描边
// flex-basis 代替定宽:窄视口允许收缩,避免横向滚动条(1920 下仍为 722)
flex: 0 1 722px;
min-width: 0;
gap: 0;
// 设计稿:标题盒顶 y772 = 卡顶 +18,方块行顶 y841 = +87,卡高 264
padding: 18px 40px 28px;
border: 1px solid @home-card-border;
border-radius: @radius-lg;
@@ -207,7 +186,6 @@ function onMore(): void {
}
&__title {
// 设计稿卡内标题 36px / 700 / #121212,盒高 52(y772-824)
font-size: @font-size-xxl;
font-weight: 700;
line-height: 52px;
@@ -216,10 +194,9 @@ function onMore(): void {
&__list {
.flex(row, flex-start, flex-start);
// 设计稿入口图标间距(图标 97 + 间隙 30);方块行顶 y841 = 卡顶 +87
gap: 30px;
margin-top: 17px;
flex-wrap: wrap; // 卡片被收缩时换行,避免卡内溢出
flex-wrap: wrap;
}
&__item {
@@ -233,7 +210,6 @@ function onMore(): void {
}
}
// 设计稿:97×97 彩色方块切图(含底色与白色图案),整图渲染
&__tile {
display: block;
width: 97px;
@@ -243,7 +219,6 @@ function onMore(): void {
}
&__label {
// 设计稿入口文字 18px / 500 / #121212
font-size: @font-size-lg;
font-weight: 500;
color: @home-ink;
@@ -251,8 +226,6 @@ function onMore(): void {
}
&__more {
// 设计稿:» 32×32 @卡内 (665,121),与方块行(顶 y+87,高 97)垂直居中 → top 87+48.5-16 = 119.5
// 绝对定位脱离 flex 流:卡收缩(窄视口)时不参与折行
position: absolute;
top: 120px;
right: 25px;

View File

@@ -2,7 +2,6 @@
import type { ServiceContentBlock } from '@/types/business/home'
interface Props {
/** 服务内容区块列表:后端每条富文本目录一项 */
contents: ServiceContentBlock[]
}
@@ -10,7 +9,6 @@ defineProps<Props>()
</script>
<template>
<!-- 设计稿:一个「服务内容」区块 = 一条富文本目录(块内含媒体与要点列表,可多块) -->
<div v-if="contents.length" class="home-contents">
<section
v-for="(block, index) in contents"
@@ -20,7 +18,6 @@ defineProps<Props>()
<h3 class="home-contents__title">
服务内容
</h3>
<!-- 后端富文本原文(含内嵌图片/视频),取自后台维护内容 -->
<div class="home-contents__rich" v-html="block.content" />
</section>
</div>
@@ -29,9 +26,8 @@ defineProps<Props>()
<style lang="less" scoped>
.home-contents {
&__block {
// 设计稿区块卡 矩形 148286 @(70,736) 1780×593:白底、无描边投影
margin-bottom: @spacing-base;
padding: 40px 45px 0; // 正文 @(115,1090) → 卡内 x45(112−70=42 标题左,正文 115−70=45)
padding: 40px 45px 0;
border-radius: @radius-lg;
background: @white;
min-height: 593px;
@@ -43,8 +39,7 @@ defineProps<Props>()
}
&__title {
// 设计稿栏目标题 36px / 700 / #121212
margin: 0 0 301px; // 正文顶 1090 − 标题底(736+40+52) ≈ 262 → 取 261
margin: 0 0 301px;
font-size: 36px;
font-weight: 700;
line-height: 52px;
@@ -52,7 +47,6 @@ defineProps<Props>()
}
&__rich {
// 设计稿正文 @(115,1090) 1688×177 16px / #222222
font-size: 16px;
line-height: 1.75;
color: @home-paragraph;
@@ -76,7 +70,6 @@ defineProps<Props>()
:deep(video) {
display: block;
max-width: 100%;
// 设计稿视频/图片通栏贴卡内边距,圆角与卡片呼应
margin: 0 auto @spacing-lg;
border-radius: @radius-base;
}

View File

@@ -7,7 +7,6 @@ interface Props {
defineProps<Props>()
/** 后端 icon 可能是图片地址;不是地址(或为空)时用名称首字兜底展示 */
function isImageIcon(icon?: string): boolean {
if (!icon) return false
return /^(https?:)?\/\//.test(icon) || icon.startsWith('/')
@@ -44,17 +43,15 @@ function isImageIcon(icon?: string): boolean {
<style lang="less" scoped>
.home-service-types {
// 设计稿区块卡 矩形 197 @(70,429) 1780×287:白底、无描边投影
margin-bottom: 20px; // 下一卡 矩形 148286 y736 − 本卡底(429+287) = 20
padding: 24px 42px 0; // 标题 @(112,453) → 卡内 x42 / y24
margin-bottom: 20px;
padding: 24px 42px 0;
border-radius: @radius-lg;
background: @white;
height: 287px;
box-sizing: border-box;
&__title {
// 设计稿栏目标题 @(112,453) 36px / 700 / #121212
margin: 0 0 132px; // 圆底顶 550 − 标题底(453+52) 之间留白,服务项文字 @y665
margin: 0 0 132px;
font-size: 36px;
font-weight: 700;
line-height: 52px;
@@ -68,15 +65,12 @@ function isImageIcon(icon?: string): boolean {
&__item {
.flex(column, center);
// 设计稿服务项文字 x:146/333/530/695/876 → 间距约 187,取定宽 187 居中
width: 187px;
// 设计稿圆底(约 y550..618) 与文字(y665) 之间约 47
gap: 47px;
}
&__icon {
.flex(row, center);
// 设计稿圆底约 68px
width: 68px;
height: 68px;
border-radius: @radius-round;
@@ -86,7 +80,6 @@ function isImageIcon(icon?: string): boolean {
font-weight: 600;
overflow: hidden;
// 每类业务圆底色按设计稿采样(顺序:Web应用/小程序/APP/二次开发/桌面工具)
.home-service-types__item:nth-child(1) & {
background: @home-service-web;
}
@@ -115,7 +108,6 @@ function isImageIcon(icon?: string): boolean {
}
&__label {
// 设计稿服务项文字 @y665 16px / #333333
font-size: 16px;
line-height: 20px;
color: @home-body;

View File

@@ -7,7 +7,6 @@ interface Props {
defineProps<Props>()
/** 展示顺序与设计稿一致:累积项目 / 进行中 / 已提交 */
const items = [
{ key: 'total', label: '累积项目' },
{ key: 'inProgress', label: '进行中' },
@@ -31,13 +30,11 @@ const items = [
<style lang="less" scoped>
.home-stats {
.flex(row, flex-end);
// 设计稿方块间距 30px
gap: 30px;
&__item {
.flex(column, center, center);
gap: 0;
// 设计稿统计方块 112×112,#024FFF 实底
width: 112px;
height: 112px;
min-width: 112px;
@@ -47,7 +44,6 @@ const items = [
}
&__value {
// 设计稿数字 48px / 500 / 白
font-size: 48px;
font-weight: 500;
line-height: 1.2;

View File

@@ -37,7 +37,6 @@ const greeting = computed(() => {
&__greeting {
.flex(row, flex-start);
gap: @spacing-sm;
// 设计稿「中午好」52px / 700 / #2C2C2C
font-size: 52px;
font-weight: 700;
color: @home-welcome;
@@ -53,7 +52,6 @@ const greeting = computed(() => {
}
&__summary {
// 设计稿副文案 24px / 400 / #2C2C2C
font-size: 24px;
font-weight: 400;
color: @home-welcome;

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { computed, onMounted, watch } from 'vue'
import { useRoute } from 'vue-router'
// 业务详情页:数据只经 useHomeStore,不直接 import api
import { useHomeStore } from '@/stores/modules/home'
import type { BusinessType } from '@/types/api'
import HomeServiceContents from './cpns/HomeServiceContents.vue'
@@ -23,7 +22,6 @@ onMounted(load)
</script>
<template>
<!-- 业务详情:设计实测内容区 x70→1850(宽 1780),故与其它常规页一致用 .container -->
<div class="business-detail">
<div class="container">
<nav class="business-detail__breadcrumb">
@@ -60,13 +58,11 @@ onMounted(load)
<style lang="less" scoped>
.business-detail {
// 设计实测:面包屑 y104、头图条 y190、白卡 y429/y736
padding-top: 32px; // 面包屑顶 = 104 − 顶栏 72
padding-top: 32px;
padding-bottom: @spacing-xxl;
&__breadcrumb {
// 设计稿面包屑 @(70,104) 24px/500 #666666
margin-bottom: 49px; // 头图条顶 190 − 面包屑底(104+37)
margin-bottom: 49px;
font-size: 24px;
font-weight: 500;
line-height: 37px;
@@ -77,11 +73,10 @@ onMounted(load)
}
}
// 设计稿头图条 矩形 195 @(70,190) 1780×219(浅蓝渐变底)
&__hero {
.flex(column, flex-start);
margin-bottom: @spacing-base;
padding: 129px 29px 0; // 业务名 @(99,319) → 卡内 x29 / y129
padding: 129px 29px 0;
border-radius: @radius-lg;
background: @home-detail-hero-bg;
height: 219px;
@@ -95,16 +90,15 @@ onMounted(load)
}
&__logo {
display: none; // 设计稿头图条内无独立 logo 块
display: none;
}
&__intro {
.flex(column, flex-start);
gap: 8px; // 名称底 319+33=352 → 副标题顶 360
gap: 8px;
}
&__name {
// 设计稿业务名 @(99,319) 26px / #333333
margin: 0;
font-size: 26px;
font-weight: 400;
@@ -113,7 +107,6 @@ onMounted(load)
}
&__slogan {
// 设计稿副标题 @(99,360) 14px/400 #333333
margin: 0;
font-size: 14px;
font-weight: 400;
@@ -122,7 +115,7 @@ onMounted(load)
}
&__cta {
display: none; // 设计稿无底部 CTA 块
display: none;
}
}
</style>

View File

@@ -2,7 +2,6 @@
<script setup lang="ts">
import { computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useHomeStore } from '@/stores/modules/home'
import type { BusinessType } from '@/types/api'
import HomeBanner from './cpns/HomeBanner.vue'
@@ -28,10 +27,8 @@ onMounted(() => {
<template>
<div class="home">
<!-- 设计稿头图为通栏(0..1920),文案层固定叠在轮播图之上 -->
<HomeBanner :banners="banners" />
<!-- 首页设计稿单独基准:内容区 1680 / 留白 120,故用 container--home -->
<div class="container container--home home__dashboard">
<section class="home__dashboard-main">
<HomeWelcome :summary="todaySummary" />
@@ -56,23 +53,20 @@ onMounted(() => {
<style lang="less" scoped>
.home {
.flex(column, flex-start);
// 设计稿区块间距 ≈ 20px(内容区 1680,区块卡紧邻)
gap: 20px;
padding-top: 0;
padding-bottom: @spacing-xxl;
&__dashboard {
.flex(row, space-between, stretch);
// 设计稿左右卡间距 36px(左卡宽 922 / 右卡宽 722,内容区 1680)
gap: 36px;
}
&__dashboard-main {
.flex(row, space-between, center);
flex: 1;
min-width: 0; // 允许收缩,右侧快捷卡才能在窄视口让位
min-width: 0;
gap: @spacing-lg;
// 设计稿欢迎卡(120,754,922,245):白底 + 浅灰描边
padding: 0 73px 0 106px;
border: 1px solid @home-card-border;
border-radius: @radius-lg;

View File

@@ -69,7 +69,6 @@ const localAgree = computed({
<style lang="less" scoped>
.login-form {
.flex(column, flex-start, stretch);
// 设计稿:Tab 行 x1039 → 表单列整列 x1039 = 卡列 x1022 + 17
margin: 26px 0 0 17px;
width: 680px;
@@ -84,13 +83,12 @@ const localAgree = computed({
}
&__label {
font-size: 13px * @auth-font-scale; // 设计稿 13/500 #1F2937,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 500;
line-height: 17px * @auth-font-scale;
color: #1f2937;
}
// 设计稿:输入框 680×39、白底 + #DDE1E7 描边、文字 13/400(盒高随字体 ×@auth-font-scale)
&__input {
width: 100%;
height: 39px * @auth-font-scale;
@@ -113,8 +111,6 @@ const localAgree = computed({
}
}
// 设计稿:协议行标 @(1039,641),但密码输入框实为 y610→649 —— 设计值自相矛盾(重叠 8px)。
// 取与短信登录/注册/找回密码三页一致的 22px 间距(同页切 Tab 也不会跳)。
&__agree {
.flex(row, flex-start, center);
gap: 8px;
@@ -133,14 +129,12 @@ const localAgree = computed({
accent-color: @primary-strong;
}
// 设计稿:《用户协议》《隐私政策》为强调蓝,其余为次级灰
em {
font-style: normal;
color: @primary-strong;
}
}
// 设计稿:登录按钮 680×46 @y675、#024FFF 实底、文字 15/500(盒高随字体 ×@auth-font-scale)
&__submit {
width: 100%;
height: 46px * @auth-font-scale;

View File

@@ -87,7 +87,6 @@ function onSubmit(): void {
<style lang="less" scoped>
.sms-login {
.flex(column, flex-start, stretch);
// 设计稿:表单列 x989,Tab 行底 412 → 首个标签 438 = 26
margin: 26px 0 0 17px;
width: 680px;
@@ -97,19 +96,17 @@ function onSubmit(): void {
width: 680px;
}
// 与账号密码登录两字段间距一致
&__field + &__field {
margin-top: 40px;
}
&__label {
font-size: 13px * @auth-font-scale; // 设计稿 13/500 #1F2937,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 500;
line-height: 17px * @auth-font-scale;
color: #1f2937;
}
// 设计稿:输入框 680×39、白底 + #DDE1E7 描边、文字 13/400(盒高随字体 ×@auth-font-scale)
&__input {
width: 100%;
height: 39px * @auth-font-scale;
@@ -132,7 +129,6 @@ function onSubmit(): void {
}
}
// 设计稿:协议行 @(989,622);验证码输入底 584 → 协议行 38
&__agree {
.flex(row, flex-start, center);
gap: 8px;
@@ -151,14 +147,12 @@ function onSubmit(): void {
accent-color: @primary-strong;
}
// 设计稿:《用户协议》《隐私政策》为强调蓝,其余为次级灰
em {
font-style: normal;
color: @primary-strong;
}
}
// 设计稿:登录按钮 680×46 @y656、#024FFF 实底、文字 15/500(盒高随字体 ×@auth-font-scale)
&__submit {
width: 100%;
height: 46px * @auth-font-scale;

View File

@@ -16,7 +16,6 @@ const userStore = useUserStore()
const activeTab = ref<LoginTab>('account')
// 演示/联调默认账号:登录页打开即自动预填,可直接点登录(生产环境请清空)
const account = ref('admin')
const password = ref('admin123')
const phone = ref('')
@@ -66,14 +65,12 @@ async function onGetCode(target: string): Promise<void> {
await userStore.sendSmsCode(target)
}
catch {
// 失败提示已由 store 统一弹出,此处仅避免未处理的 rejection
}
}
</script>
<template>
<div class="auth-page">
<!-- 设计稿:左侧品牌渐变面板 @(0,0) 784×1080,文案列 x257 -->
<aside class="auth-page__brand">
<h1 class="auth-page__logo">
虫子智造研发<br>一体化平台
@@ -90,7 +87,6 @@ async function onGetCode(target: string): Promise<void> {
游客模式
</RouterLink>
<!-- 设计稿:右侧表单区起点 x1022,表单列宽 693(标签)/680(控件) -->
<main class="auth-page__main">
<div class="auth-page__card">
<h2 class="auth-page__title">
@@ -101,7 +97,6 @@ async function onGetCode(target: string): Promise<void> {
</p>
<div class="auth-page__tabs">
<!-- 设计稿 Tab 顺序:手机验证码登录在前、账号密码登录在后 -->
<button
class="auth-page__tab"
:class="{ 'is-active': activeTab === 'sms' }"
@@ -143,25 +138,22 @@ async function onGetCode(target: string): Promise<void> {
</template>
<style lang="less">
// 共用外壳 .auth-page 定义在 styles/common.less(登录/注册/找回密码三页共享)
</style>
<style lang="less" scoped>
// ===== 账号密码 / 手机验证码登录页专属 =====
.auth-page {
&__subtitle {
margin: 12px 0 0;
font-size: 13px * @auth-font-scale; // 设计稿 13/400 #6B7280,整体 ×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 400;
line-height: 17px * @auth-font-scale;
color: #6b7280;
}
// 设计稿:Tab 行 @(1039,406),两项间距 24(起 x1039 / x1163)
&__tabs {
.flex(row, flex-start, center);
gap: 24px;
margin: 26px 0 0 17px; // 406 − 363 = 43;x1039 − 1022 = 17
margin: 26px 0 0 17px;
}
&__tab {
@@ -169,7 +161,7 @@ async function onGetCode(target: string): Promise<void> {
padding: 0 0 8px;
border: none;
background: transparent;
font-size: 22px; // 固定 22px
font-size: 22px;
font-weight: 400;
color: #4b5563;
cursor: pointer;
@@ -179,7 +171,6 @@ async function onGetCode(target: string): Promise<void> {
font-weight: 600;
color: @primary-strong;
// 抵消 html zoom,保证两 Tab 下划线视觉均为 2px(否则 2px×zoom 会因亚像素取整一粗一细)
&::after {
content: '';
position: absolute;
@@ -193,9 +184,9 @@ async function onGetCode(target: string): Promise<void> {
}
&__switch {
align-self: center; // 设计稿:X 居中 @(1325,774)
margin: 53px 0 0; // 按钮底 721 → 774
font-size: 12px * @auth-font-scale; // 设计稿 12/400 #6B7280
align-self: center;
margin: 53px 0 0;
font-size: 12px * @auth-font-scale;
font-weight: 400;
line-height: 16px * @auth-font-scale;
color: #6b7280;

View File

@@ -26,7 +26,6 @@ async function onGetCode(): Promise<void> {
await userStore.sendSmsCode(phone.value)
}
catch {
// 失败提示已由 store 统一弹出,此处仅避免未处理的 rejection
}
}
@@ -124,7 +123,6 @@ onBeforeUnmount(() => {
placeholder="请设置6-20位密码"
autocomplete="new-password"
>
<!-- 设计稿:密码框下 15 高密码强度条 + 15 高提示行 -->
<PasswordStrength :password="password" />
</div>
@@ -159,11 +157,9 @@ onBeforeUnmount(() => {
</template>
<style lang="less" scoped>
// 注册账号页:表单块由 .auth-page__main 在右区内居中(设计稿 02)
.register {
&__form {
.flex(column, flex-start, stretch);
// 副标题底 342 → 首个标签 368 = 26(副标题行盒 17 + 外边距 12 → 实际需补 38)
margin: 38px 0 0 17px;
width: 680px;
}
@@ -174,13 +170,12 @@ onBeforeUnmount(() => {
width: 680px;
}
// 设计稿:手机号框底 430 → 验证码标签 450 = 20;验证码框底 514 → 设置密码标签 532 = 18
&__field + &__field {
margin-top: 18px;
}
&__label {
font-size: 13px * @auth-font-scale; // 设计稿 13/500 #1F2937,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 500;
line-height: 17px * @auth-font-scale;
color: #1f2937;
@@ -208,7 +203,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:协议行 @(999,748)
&__agree {
.flex(row, flex-start, center);
gap: 8px;
@@ -233,7 +227,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:注册按钮 680×46 @y782、#024FFF 实底、文字 15/500(盒高随字体 ×@auth-font-scale)
&__submit {
width: 100%;
height: 46px * @auth-font-scale;
@@ -252,7 +245,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:按钮底 828 → 切换行 844 = 16
&__switch {
align-self: center;
margin: 16px 0 0;
@@ -264,7 +256,7 @@ onBeforeUnmount(() => {
&__subtitle {
margin: 12px 0 0;
font-size: 13px * @auth-font-scale; // 设计稿 13/400 #6B7280,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 400;
line-height: 17px * @auth-font-scale;
color: #6b7280;

View File

@@ -26,7 +26,6 @@ async function onGetCode(): Promise<void> {
await userStore.sendSmsCode(phone.value)
}
catch {
// 失败提示已由 store 统一弹出,此处仅避免未处理的 rejection
}
}
@@ -126,7 +125,6 @@ onBeforeUnmount(() => {
placeholder="请设置6-20位密码"
autocomplete="new-password"
>
<!-- 设计稿:密码框下 15 高密码强度条 + 15 高提示行 -->
<PasswordStrength :password="password" />
</div>
@@ -161,11 +159,9 @@ onBeforeUnmount(() => {
</template>
<style lang="less" scoped>
// 找回密码页:表单块由 .auth-page__main 在右区内居中(设计稿 02)
.reset {
&__form {
.flex(column, flex-start, stretch);
// 副标题底 335 → 首个标签 361 = 26(副标题行盒 17 + 外边距 12 → 实际需补 38)
margin: 38px 0 0 17px;
width: 680px;
}
@@ -176,13 +172,12 @@ onBeforeUnmount(() => {
width: 680px;
}
// 设计稿:手机号框底 425 → 验证码标签 443 = 18
&__field + &__field {
margin-top: 18px;
}
&__label {
font-size: 13px * @auth-font-scale; // 设计稿 13/500 #1F2937,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 500;
line-height: 17px * @auth-font-scale;
color: #1f2937;
@@ -210,7 +205,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:协议行 @(1040,741)
&__agree {
.flex(row, flex-start, center);
gap: 8px;
@@ -235,7 +229,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:确认修改按钮 680×46 @y775、#024FFF 实底、文字 15/500(盒高随字体 ×@auth-font-scale)
&__submit {
width: 100%;
height: 46px * @auth-font-scale;
@@ -254,7 +247,6 @@ onBeforeUnmount(() => {
}
}
// 设计稿:按钮底 821 → 切换行 838 = 17
&__switch {
align-self: center;
margin: 17px 0 0;
@@ -266,7 +258,7 @@ onBeforeUnmount(() => {
&__subtitle {
margin: 12px 0 0;
font-size: 13px * @auth-font-scale; // 设计稿 13/400 #6B7280,×@auth-font-scale
font-size: 13px * @auth-font-scale;
font-weight: 400;
line-height: 17px * @auth-font-scale;
color: #6b7280;

View File

@@ -41,10 +41,10 @@ const emojiMap: Record<MessageType, string> = {
<style lang="less" scoped>
.message-item {
position: relative; // 未读徽标相对行定位(压图标右上角)
position: relative;
.flex(row, flex-start);
gap: @spacing-base; // 图标→标题 22 × 0.77
padding: 14px 17px; // 行内边距 23/22 × 0.77
gap: @spacing-base;
padding: 14px 17px;
background: @white;
cursor: pointer;
transition: background 0.2s;
@@ -53,7 +53,6 @@ const emojiMap: Record<MessageType, string> = {
background: @bg-color-light;
}
// 类型图标圆:设计 43 直径 40 × 0.77,实取 #3B82F6
&__emoji {
flex-shrink: 0;
.flex(row, center);
@@ -67,10 +66,10 @@ const emojiMap: Record<MessageType, string> = {
&__body {
.flex(column, flex-start, stretch);
gap: 5px; // 标题→摘要 6 × 0.77
gap: 5px;
flex: 1;
min-width: 0;
margin-top: 6px; // 标题比图标顶下移 9 × 0.77
margin-top: 6px;
}
&__head {
@@ -79,7 +78,6 @@ const emojiMap: Record<MessageType, string> = {
width: 100%;
}
// 设计 43:标题 14 → 可读下限 11 / 600 / #1F2937(所有行均半粗)
&__title {
font-size: 11px;
font-weight: 600;
@@ -89,17 +87,15 @@ const emojiMap: Record<MessageType, string> = {
&__time {
flex-shrink: 0;
font-size: 11px; // 设计 12 → 可读下限 11
color: @text-color-disabled; // 设计 43 时间 @text-color-disabled(覆盖 text-secondary)
font-size: 11px;
color: @text-color-disabled;
}
// 设计 43:摘要 12 → 可读下限 11 / #6B7280(text-secondary)
&__summary {
font-size: 11px;
.ellipsis();
}
// 未读徽标:设计 43 红圆压图标右上(≈ 直径 20 × 0.77)
&__dot {
position: absolute;
top: 12px;

View File

@@ -30,13 +30,12 @@ const emit = defineEmits<{ view: [id: string] }>()
<style lang="less" scoped>
.message-list {
.flex(column, flex-start, stretch);
gap: 0; // 行紧排,行间以分割线分隔(设计 43)
gap: 0;
padding: 0;
border-radius: @radius-base;
background: @white; // 设计 43 列表卡白底直压页面灰底
overflow: hidden; // 悬停底色收敛在卡圆角内
background: @white;
overflow: hidden;
// 行分割线:设计 43 实取 #F0F1F3(矩形 1/2,跨满卡内容宽)
.message-item + .message-item {
border-top: 1px solid @project-divider;
}
@@ -44,7 +43,7 @@ const emit = defineEmits<{ view: [id: string] }>()
&__empty {
padding: 40px 0;
text-align: center;
font-size: 11px; // 设计 43 空态文字 → 可读下限 11
font-size: 11px;
}
}
</style>

View File

@@ -47,21 +47,21 @@ function countOf(value: MessageType | 'all', counts: Counts): number {
<style lang="less" scoped>
.message-tabs {
.flex(column, flex-start, stretch);
padding: 18px 0; // 卡上内边距 24 × 0.77
min-height: 338px; // 设计左卡高 439 × 0.77
padding: 18px 0;
min-height: 338px;
border-radius: @radius-base;
background: @white;
box-shadow: none; // 设计 43:白卡直压页面底色,无阴影无描边
box-shadow: none;
&__tab {
.flex(row, space-between);
gap: @spacing-sm;
height: 32px; // 分类行间距 41 × 0.77
padding: 0 18px 0 25px; // 左 33 / 右 23 × 0.77
height: 32px;
padding: 0 18px 0 25px;
border-radius: 0;
background: transparent;
color: @text-color; // 设计 43 未选中 @text-color
font-size: 11px; // 设计 13 → 可读下限 11
color: @text-color;
font-size: 11px;
font-weight: 400;
transition: all 0.2s;
@@ -70,26 +70,26 @@ function countOf(value: MessageType | 'all', counts: Counts): number {
}
&.is-active {
background: transparent; // 设计 43 选中无胶囊底
color: @primary-strong; // 设计 43 选中 @primary-strong
background: transparent;
color: @primary-strong;
font-weight: 600;
}
}
&__count {
min-width: 15px; // 徽标直径 20 × 0.77
min-width: 15px;
height: 15px;
padding: 0 4px;
border-radius: @radius-round;
background: @danger-color; // 设计 43 红底 ≈ #F54343
background: @danger-color;
color: @white;
font-size: 11px; // 设计 10 → 可读下限 11
font-size: 11px;
line-height: 15px;
text-align: center;
}
.is-active &__count {
background: @danger-color; // 设计 43 选中项徽标仍为红底
background: @danger-color;
color: @white;
font-weight: 600;
}

View File

@@ -3,7 +3,6 @@ import { computed, onMounted, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { useRoute, useRouter } from 'vue-router'
import { AppButton } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useMessageStore } from '@/stores/modules/message'
import { formatFileSize } from '@/utils/format'
@@ -105,12 +104,11 @@ onMounted(load)
margin: 0 auto;
padding: @spacing-lg @spacing-base @spacing-xxl;
// 设计 42:面包屑 12 → 11,#9CA3AF;末段「消息详情」#4B5563 / 500
&__breadcrumb {
display: flex;
align-items: center;
gap: 4px;
margin-bottom: 12px; // 面包屑→卡片 15 × 0.77
margin-bottom: 12px;
font-size: 11px;
color: @text-color-disabled;
@@ -124,15 +122,13 @@ onMounted(load)
}
}
// 设计 42:白卡直压页面灰底,无阴影
&__card {
padding: 32px 36px 34px; // 卡内边距 42/48/44 × 0.77
padding: 32px 36px 34px;
border-radius: @radius-lg;
background: @white;
box-shadow: none;
}
// 设计 42:主标题 20 → 15 / 700 / 居中 / #1F2937
&__title {
font-size: 15px;
font-weight: 700;
@@ -140,7 +136,6 @@ onMounted(load)
text-align: center;
}
// 设计 42:发布时间 12 → 11 / #9CA3AF / 居中
&__time {
margin-top: 11px; // 14 × 0.77
font-size: 11px;
@@ -148,9 +143,8 @@ onMounted(load)
text-align: center;
}
// 设计 42:富文本 13 → 11 / #4B5563 / 居中 / 行高 24.7 × 0.77
&__content {
margin-top: 24px; // 时间→正文 32 × 0.77
margin-top: 24px;
background: transparent;
color: @text-color;
font-size: 11px;
@@ -161,7 +155,7 @@ onMounted(load)
}
&__attachments {
margin-top: 20px; // 正文→附件 26 × 0.77
margin-top: 20px;
&-title {
margin-bottom: 8px;
@@ -176,14 +170,13 @@ onMounted(load)
gap: @spacing-sm;
}
// 附件行:设计 42 实取底 #F7F8FA、圆角小卡、无描边
&__file {
.flex(row, space-between);
gap: @spacing-base;
align-items: center;
width: fit-content;
max-width: 100%;
padding: 10px 14px; // 附件盒 13/15 × 0.77
padding: 10px 14px;
border: none;
border-radius: 6px;
background: @finance-row-bg;
@@ -196,7 +189,6 @@ onMounted(load)
min-width: 0;
}
// 设计 42:文件名 12 → 11 / 700 / #1F2937
&__file-name {
font-size: 11px;
font-weight: 700;
@@ -204,7 +196,6 @@ onMounted(load)
.ellipsis();
}
// 设计 42:大小 12 → 11 / #9CA3AF
&__file-meta {
font-size: 11px;
color: @text-color-disabled;
@@ -226,10 +217,9 @@ onMounted(load)
}
}
// 返回:设计 42 右下角 #024FFF 小按钮
&__actions {
.flex(row, flex-end);
margin-top: 32px; // 附件→返回 43 × 0.77
margin-top: 32px;
.app-button {
height: 24px; // 31 × 0.77
@@ -237,7 +227,7 @@ onMounted(load)
border-radius: 6px;
background: @primary-strong;
color: @white;
font-size: 11px; // 13 → 可读下限 11
font-size: 11px;
font-weight: 500;
&:hover {

View File

@@ -4,7 +4,6 @@ import { computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
import { AppButton, FilterPanel, PaginationBar } from '@/components'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useMessageStore } from '@/stores/modules/message'
import type { MessageType } from '@/types/business/message'
import MessageTabs from './cpns/MessageTabs.vue'
@@ -115,17 +114,15 @@ onMounted(() => {
&__head {
.flex(row, flex-start);
margin-bottom: -10px; // 标题→副标题净距 8 × 0.77(叠加父级 gap 16)
margin-bottom: -10px;
}
// 设计 43:标题 22 × 0.77,700,#1F2937
&__title {
font-size: 17px;
font-weight: 700;
color: @heading-color;
}
// 设计 43:副标题整行居中,13 → 可读下限 11,#6B7280(text-secondary)
&__subtitle {
text-align: center;
font-size: 11px;
@@ -133,28 +130,27 @@ onMounted(() => {
&__body {
.flex(row, flex-start);
gap: 26px; // 左右栏间距 34 × 0.77
gap: 26px;
align-items: flex-start;
}
&__tabs {
flex-shrink: 0;
width: 156px; // 左分类卡宽 202 × 0.77
width: 156px;
}
&__main {
.flex(column, flex-start, stretch);
gap: 15px; // 卡片纵向间距 19 × 0.77
gap: 15px;
flex: 1;
min-width: 0;
}
// 搜索行白卡:设计 43 x243..1897 / y370..435,输入与「全部已读」同卡
&__toolbar {
.flex(row, flex-start);
align-items: center;
gap: 11px;
padding: 10px 17px; // 卡内边距 22/16 × 0.77
padding: 10px 17px;
border-radius: @radius-base;
background: @white;
}
@@ -166,7 +162,6 @@ onMounted(() => {
background: transparent;
}
// 「全部已读」:设计 43 白底浅描边 12 → 11 / 500 #4B5563
& .message__mark-read {
flex-shrink: 0;
height: 26px; // 34 × 0.77
@@ -191,7 +186,6 @@ onMounted(() => {
padding: 0;
}
// FilterPanel 内部按设计 43 覆写(灰底输入框 / 灰重置 / 蓝搜索,重置在前)
.message__filter {
:deep(.filter-panel__bar) {
gap: 6px;
@@ -203,19 +197,19 @@ onMounted(() => {
:deep(.filter-panel__input) {
order: 0;
flex: 0 1 349px; // 输入框宽 453 × 0.77
flex: 0 1 349px;
max-width: 349px;
height: 29px; // 38 × 0.77
margin-right: 2px; // 叠加 bar gap 6 ≈ 输入→按钮 8 × 0.77
margin-right: 2px;
padding: 0 10px;
border: none;
border-radius: 6px;
background: @finance-field-bg; // 设计 43 实取 @input-bg
background: @finance-field-bg;
color: @text-color;
font-size: 11px; // 设计 13 → 可读下限 11
font-size: 11px;
&::placeholder {
color: @contract-placeholder; // 设计 43 实取 #B3B9C4
color: @contract-placeholder;
}
&:focus {
@@ -225,12 +219,12 @@ onMounted(() => {
:deep(.filter-panel__btn) {
order: 1;
min-width: 46px; // 重置 57 × 0.77
min-width: 46px;
height: 29px;
padding: 0 12px;
border: none;
border-radius: 6px;
background: @contract-reset-bg; // 设计 43 重置底 #EEF0F3
background: @contract-reset-bg;
color: @text-color;
font-size: 11px;
font-weight: 500;
@@ -243,7 +237,7 @@ onMounted(() => {
:deep(.filter-panel__btn--primary) {
order: 2;
background: @primary-strong; // 设计 43 搜索底 @primary-strong
background: @primary-strong;
color: @white;
&:hover {

View File

@@ -15,7 +15,6 @@ import AboutPanel from './cpns/AboutPanel.vue'
</template>
<style lang="less" scoped>
// 设计 19(关于我们):面板内标题蓝条,正文各区块平铺
.about-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -29,7 +28,7 @@ import AboutPanel from './cpns/AboutPanel.vue'
&__title {
position: relative;
padding-left: 12px;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
color: @heading-color;
line-height: 20px;

View File

@@ -143,7 +143,6 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 20(地址管理):标题蓝条、整行白卡描边、字段标签灰/值深、白底描边小按钮、分页靠右
.address-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -158,7 +157,7 @@ onMounted(() => {
&__title {
position: relative;
padding-left: 12px;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
color: @heading-color;
line-height: 20px;
@@ -175,7 +174,6 @@ onMounted(() => {
}
}
// 设计 20:列表整行铺满(单列),分页靠右
&__grid {
display: grid;
grid-template-columns: 1fr;
@@ -201,7 +199,6 @@ onMounted(() => {
color: @primary-strong;
}
// 顶部「+ 新增地址」:小号蓝底按钮(设计 20 实取 #024FFF)
.app-button--primary {
height: 24px;
padding: 0 10px;
@@ -231,18 +228,16 @@ onMounted(() => {
.flex(row, flex-start, center);
gap: @spacing-xs;
flex-shrink: 0;
flex-direction: column-reverse; // 设计 20:「默认」标签在上、姓名在下
flex-direction: column-reverse;
align-items: flex-start;
}
// 设计 20:字段值 13 设计px w600 深灰
&__name {
font-size: 11px;
font-weight: 600;
color: @heading-color;
}
// 设计 20:标签 11 设计px 灰、值 13 设计px w600 深;整行横向排布
&__meta {
.flex(row, flex-start);
gap: @spacing-xl;
@@ -278,7 +273,6 @@ onMounted(() => {
border-top: none;
}
// 设计 20:操作按钮 = 白底灰描边、12 设计px w500 灰字
&__btn {
height: 24px;
padding: 0 10px;
@@ -308,7 +302,6 @@ onMounted(() => {
}
}
// 「默认」标签:设计 20 实取蓝底 #024FFF 白字
.address-card .status-tag {
padding: 2px 8px;
background: @primary-strong;

View File

@@ -82,7 +82,6 @@ const advantages = [
</template>
<style lang="less" scoped>
// 设计 19(关于我们):区块标题 14 设计px w700、正文 13 设计px 灰、平铺无卡片底
.about-panel {
.flex(column, flex-start);
gap: @spacing-lg;
@@ -96,7 +95,7 @@ const advantages = [
}
&__title {
font-size: 11px; // 设计 14 → 11
font-size: 11px;
font-weight: 700;
color: @heading-color;
}
@@ -107,7 +106,6 @@ const advantages = [
line-height: 1.9;
}
// 设计 19:优势项为「标题 + 描述」同排平铺,标题亦为灰色加粗
&__advantages {
display: grid;
grid-template-columns: 1fr;

View File

@@ -123,7 +123,6 @@ function onSave(): void {
</template>
<style lang="less" scoped>
// 与个人中心其它弹窗同规格(设计 22~27):白卡 700px、蓝条标题、白底描边输入、等宽双按钮
.address-dialog {
position: fixed;
inset: 0;

View File

@@ -149,8 +149,6 @@ function onSubmit(): void {
</template>
<style lang="less" scoped>
// 设计 23~27(绑定/换绑/身份验证弹窗):与修改密码弹窗同规格 —— 白卡 700px、蓝条标题、
// 白底描边输入、底部等宽双按钮;设计稿无蒙层压暗,遮罩透明。
.bind-dialog {
position: fixed;
inset: 0;
@@ -160,7 +158,7 @@ function onSubmit(): void {
overflow-y: auto;
&__panel {
width: 700px; // 设计 900 × 0.77
width: 700px;
max-width: calc(100vw - 32px);
max-height: calc(100vh - 48px);
overflow-y: auto;
@@ -173,7 +171,6 @@ function onSubmit(): void {
.scrollbar();
}
// 设计 22~26:蓝条 + 标题 15 设计px w700 深灰
&__title {
position: relative;
padding-left: 12px;
@@ -194,7 +191,6 @@ function onSubmit(): void {
}
}
// 设计 23:身份验证标题为纯蓝字 14 设计px(无蓝条)
&__title:has(+ .bind-dialog__desc) {
padding-left: 0;
font-size: 11px;
@@ -205,7 +201,6 @@ function onSubmit(): void {
}
}
// 设计 23:说明为纯灰字(非底色块)
&__desc {
padding: 0;
background: transparent;
@@ -265,7 +260,6 @@ function onSubmit(): void {
}
}
// 设计 24/25/26:底部等宽双按钮,次级 #EEF0F3、主色 #024FFF
&__footer {
.flex(row, flex-start);
gap: @spacing-sm;

View File

@@ -4,7 +4,6 @@ import { ElMessage } from 'element-plus'
import { AppButton, PasswordStrength, SmsCodeInput } from '@/components'
interface Props {
/** 绑定手机号(脱敏展示) */
phone: string
}
@@ -120,8 +119,6 @@ function onSubmit(): void {
</template>
<style lang="less" scoped>
// 设计 22(修改密码弹窗):白卡 900×~540 设计px、蓝条标题、白底描边输入 40 设计px、
// 整行蓝色主按钮;设计稿无蒙层压暗(页面原样可见),故遮罩透明。
.change-pwd-dialog {
position: fixed;
inset: 0;
@@ -131,7 +128,7 @@ function onSubmit(): void {
overflow-y: auto;
&__panel {
width: 700px; // 设计 900 × 0.77
width: 700px;
max-width: calc(100vw - 32px);
max-height: calc(100vh - 48px);
overflow-y: auto;
@@ -144,7 +141,6 @@ function onSubmit(): void {
.scrollbar();
}
// 设计 22:蓝条(#024FFF 4×20 设计px)+ 标题 15 设计px w700
&__title {
position: relative;
padding-left: 12px;
@@ -171,14 +167,12 @@ function onSubmit(): void {
width: 100%;
}
// 设计 22:标签 13 设计px w500 深灰
&__label {
font-size: 11px;
font-weight: 500;
color: @heading-color;
}
// 设计 22:白底、#DDE1E7 描边、40 设计px ≈ 32px 高、13 设计px 字
&__input {
width: 100%;
height: 32px;
@@ -223,7 +217,6 @@ function onSubmit(): void {
}
}
// 设计 24:底部两枚等宽整行按钮 —— 次级 #EEF0F3 灰底、主色 #024FFF
&__footer {
.flex(row, flex-start);
gap: @spacing-sm;

View File

@@ -5,7 +5,6 @@ import type { FileInfo } from '@/types/api'
import type { Feedback } from '@/types/business/profile'
interface Props {
/** 递增时清空表单(父级提交成功/重置信号) */
resetSignal?: number
}
@@ -87,7 +86,6 @@ function onReset(): void {
<span class="feedback-form__counter text-secondary">{{ form.description.length }}/500</span>
</div>
<p class="feedback-form__tip">
提交后我们的专业顾问将在一个工作日内与您联系,为您提供一对一服务
</p>
@@ -114,8 +112,6 @@ function onReset(): void {
</template>
<style lang="less" scoped>
// 设计 18(意见反馈表单):表单直接铺在白面板上(无内嵌卡)、标签 13 设计px w500、
// 白底 #DDE1E7 描边输入、计数灰字、附件区白底描边
.feedback-form {
.flex(column, flex-start);
gap: @spacing-base;
@@ -163,7 +159,7 @@ function onReset(): void {
}
&__input {
height: 32px; // 设计 40 × 0.77
height: 32px;
}
&__textarea {
@@ -172,7 +168,6 @@ function onReset(): void {
resize: vertical;
}
// 设计 18:字数统计 11 设计px 灰字
&__counter {
align-self: flex-end;
color: @text-color-disabled;
@@ -193,7 +188,6 @@ function onReset(): void {
gap: @spacing-sm;
}
// 附件区:设计 18 白底 + #DDE1E7 描边
:deep(.upload-area) {
min-height: 56px;
border: 1px solid @profile-input-border;

View File

@@ -42,8 +42,6 @@ defineProps<Props>()
</template>
<style lang="less" scoped>
// 设计 16(帮助中心 FAQ):分类标题居中 14 设计px w700、Q 加粗深灰、A 13 设计px 灰,
// 无卡片底色/描边,平铺在面板上
.help-faq {
.flex(column, flex-start);
gap: @spacing-base;
@@ -56,7 +54,7 @@ defineProps<Props>()
.flex(row, center, center);
justify-content: center;
padding: 0;
font-size: 11px; // 设计 14 → 11
font-size: 11px;
font-weight: 700;
color: @heading-color;
cursor: pointer;

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
// 热线展示(静态 mock,接入站点配置后由 store 提供)
const HOTLINE = '000-000-0000'
const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
</script>
@@ -22,8 +21,6 @@ const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
</template>
<style lang="less" scoped>
// 设计 14(专属客服热线):面板内整行浅蓝卡(#D6E4FB)、蓝色圆形图标、
// 标题 19 设计px w700、号码 24 设计px 蓝色 w700、时间 12 设计px 灰
.hotline-panel {
.flex(row, flex-start);
padding: 0;
@@ -46,7 +43,6 @@ const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
align-items: center;
}
// 设计 14 实取:#024FFF 蓝色圆底(直径约 64 设计px)
&__icon {
.flex(row, center);
grid-area: icon;
@@ -63,14 +59,14 @@ const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
&__title {
grid-area: title;
align-self: end;
font-size: 15px; // 设计 19 → 15
font-size: 15px;
font-weight: 700;
color: @heading-color;
}
&__number {
grid-area: number;
font-size: 18px; // 设计 24 → 18
font-size: 18px;
font-weight: 700;
color: @primary-strong;
line-height: 1.3;
@@ -80,7 +76,7 @@ const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
grid-area: time;
align-self: start;
color: @text-color-secondary;
font-size: 11px; // 设计 12 → 11
font-size: 11px;
}
}
</style>

View File

@@ -4,7 +4,6 @@ interface MenuItem {
label: string
}
// 设计稿(个人中心)菜单项 y268/304/340/376/412/448/484/520,行距 36,文字 x179(卡内缩进 24)
const menus: MenuItem[] = [
{ to: '/profile/security', label: '账号安全' },
{ to: '/profile/address', label: '地址管理' },
@@ -31,7 +30,6 @@ const menus: MenuItem[] = [
</template>
<style lang="less" scoped>
// 设计稿:菜单为独立白卡(245 宽),选中项浅蓝底 @profile-nav-active-bg 圆角 6
.profile-sider {
.flex(column, flex-start);
gap: 0;
@@ -41,11 +39,11 @@ const menus: MenuItem[] = [
&__item {
.flex(row, flex-start, center);
height: 36px; // 设计行距 36
padding: 0 24px; // 卡 x155 → 文字 x179
height: 36px;
padding: 0 24px;
border-radius: @profile-radius;
color: @text-color;
font-size: @font-size-base; // 设计 12/400
font-size: @font-size-base;
font-weight: 400;
transition: all 0.2s;

View File

@@ -48,8 +48,6 @@ function save(): void {
</template>
<style lang="less" scoped>
// 设计稿(个人中心):头像 46 圆形居中,名称 18/600,手机 14/400;
// 整块 245×110 紫渐变卡,内容垂直居中
.profile-user-card {
.flex(column, center, center);
height: 110px;
@@ -77,7 +75,7 @@ function save(): void {
border: 1px solid transparent;
border-radius: @profile-radius;
background: transparent;
font-size: @font-size-lg; // 设计 18/600
font-size: @font-size-lg;
font-weight: 600;
color: @white;
text-align: center;
@@ -102,7 +100,7 @@ function save(): void {
&__phone {
margin-top: 6px;
font-size: @font-size-sm; // 设计 14/400
font-size: @font-size-sm;
color: @white;
text-align: center;
}

View File

@@ -59,7 +59,6 @@ const STATUS_VARIANTS: Record<QualificationStatus, 'success' | 'warning' | 'dang
</template>
<style lang="less" scoped>
// 设计 17(资质列表行):白卡灰描边、字段标签灰/值深 w600、状态为纯文字、白底描边操作按钮
.qual-card {
.flex(column, flex-start);
gap: @spacing-sm;
@@ -74,7 +73,7 @@ const STATUS_VARIANTS: Record<QualificationStatus, 'success' | 'warning' | 'dang
}
&__name {
font-size: 11px; // 设计 13 → 11
font-size: 11px;
font-weight: 600;
color: @heading-color;
.multi-ellipsis(2);
@@ -107,7 +106,6 @@ const STATUS_VARIANTS: Record<QualificationStatus, 'success' | 'warning' | 'dang
width: 100%;
}
// 设计 17:操作按钮 = 白底灰描边、12 设计px w500 灰字
&__btn {
height: 24px;
padding: 0 10px;
@@ -135,11 +133,10 @@ const STATUS_VARIANTS: Record<QualificationStatus, 'success' | 'warning' | 'dang
}
}
// 设计 17:状态为纯文字(已认证/审核中深灰、未通过红),无底色胶囊
.qual-card .status-tag {
padding: 0;
background: transparent;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
&--success {

View File

@@ -59,7 +59,6 @@ function onUpload(file: File): void {
}
function onPreview(file: FileInfo): void {
// 同源预览:资质附件多为本地未上传文件(无 ossId),弹窗会提示无法在线预览
ossStore.openPreview(file)
}
@@ -184,7 +183,6 @@ function onSave(): void {
</template>
<style lang="less" scoped>
// 与个人中心其它弹窗同规格(设计 22~27):白卡 700px、蓝条标题、白底描边输入、等宽双按钮
.qual-dialog {
position: fixed;
inset: 0;

View File

@@ -21,7 +21,6 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
<template>
<div class="security-panel">
<!-- 设计稿:三行白卡 1672×86,行距 16,左缩进 24 -->
<section
class="security-panel__row"
@click="emit('changePassword')"
@@ -73,7 +72,6 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
<span class="security-panel__arrow" aria-hidden="true">›</span>
</section>
<!-- 设计稿:注销账号 1672×48,灰字,浅灰描边 -->
<button
type="button"
class="security-panel__delete"
@@ -85,10 +83,6 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
</template>
<style lang="less" scoped>
// 设计稿(个人中心):
// 行卡 1672×86 bg #FFFFFF bd #F0F1F3/1,行距 16;标题 14/600 #1F2937 @x428
// 副文 11/400 #9CA3AF;右端状态 11/500(已设置 #16A34A / 未绑定 #6B7280)+ 箭头 ›
// 注销按钮 1672×48 bd #E5E7EB/1,文字 15/500 #9CA3AF
.security-panel {
.flex(column, flex-start, stretch);
gap: @spacing-base;
@@ -114,14 +108,14 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
}
&__title {
font-size: @font-size-base; // 设计 14/600
font-size: @font-size-base;
font-weight: 600;
color: @profile-ink;
}
&__sub {
margin-top: 6px;
font-size: @font-size-sm; // 设计 11/400
font-size: @font-size-sm;
color: @finance-axis-text; // #9CA3AF
}
@@ -129,10 +123,10 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
margin-left: auto;
font-size: @font-size-sm;
font-weight: 500;
color: @finance-muted-text; // 未绑定 #6B7280
color: @finance-muted-text;
&--ok {
color: @success-color; // 已设置 / 已绑定 #16A34A
color: @success-color;
}
}
@@ -150,7 +144,7 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
border-radius: @radius-base;
background: @white;
color: @finance-axis-text;
font-size: @font-size-base; // 设计 15/500
font-size: @font-size-base;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;

View File

@@ -24,7 +24,6 @@ const router = useRouter()
const profileStore = useProfileStore()
const { favorites, favoritesTotal, favoritesCounts, favoritesQuery } = storeToRefs(profileStore)
// 本地搜索条件(搜索/重置时同步进 store)
const keyword = ref('')
const category = ref<BusinessType | 'all'>('all')
@@ -96,7 +95,6 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 收藏列表无独立设计稿:与个人中心面板一致 —— 分类条平铺在白面板上,选中态用主色 token
.favorites-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -133,7 +131,6 @@ onMounted(() => {
}
}
// 分页与地址/资质页保持同一激活态(设计 20 实取 #D1E0FE + #024FFF 字)
:deep(.pagination) {
justify-content: flex-end;
padding: 0;

View File

@@ -32,7 +32,6 @@ function onReset(): void {
}
function onPreview(file: FileInfo): void {
// 同源预览:本地未上传文件无 ossId,弹窗会提示无法在线预览
ossStore.openPreview(file)
}
</script>
@@ -58,7 +57,6 @@ function onPreview(file: FileInfo): void {
</template>
<style lang="less" scoped>
// 设计 18(意见反馈):面板内标题蓝条 + 副文案,表单直接铺在面板上
.feedback-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -74,7 +72,7 @@ function onPreview(file: FileInfo): void {
&__title {
position: relative;
padding-left: 12px;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
color: @heading-color;
line-height: 20px;

View File

@@ -28,7 +28,6 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 16(帮助中心):面板内标题蓝条 + 副文案,FAQ 平铺在面板上
.help-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -44,7 +43,7 @@ onMounted(() => {
&__title {
position: relative;
padding-left: 12px;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
color: @heading-color;
line-height: 20px;

View File

@@ -6,8 +6,6 @@ import { useProfileStore } from '@/stores/modules/profile'
import ProfileSider from './cpns/ProfileSider.vue'
import ProfileUserCard from './cpns/ProfileUserCard.vue'
// 布局容器:左侧用户卡 + 菜单(x155 起 245 宽),右侧内容卡(x400 起 1400 宽)
// 数据只经 store
const profileStore = useProfileStore()
const { profile } = storeToRefs(profileStore)
@@ -37,16 +35,12 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计稿(个人中心 1920×1568)锚点:
// 面包屑 y23 h26 · 左列 x155 宽 245 · 右卡 x400 y98 1400×532 · 页脚 y1087
// 内容区顶 98 = 顶栏 72 + 上留白 26
.profile {
min-height: 737px; // 内容区 y98→835
min-height: 737px;
background: @profile-page-bg;
&__container {
padding-top: 26px; // 顶栏 72 → 内容区 98
// 个人中心系独立基准(视觉核对定版 x155/1600),不随全站 70/1780 联动
padding-top: 26px;
padding-left: clamp(@spacing-base, calc((100% - @profile-content) / 2), @profile-gutter);
padding-right: clamp(@spacing-base, calc((100% - @profile-content) / 2), @profile-gutter);
}
@@ -56,8 +50,6 @@ onMounted(() => {
width: 100%;
}
// 左列 200:用户卡 + 菜单白卡,两卡间距 6
// (设计稿左列 245、右卡 1400,合计 1645 超出内容宽 1595,按比例收左列到 200 保右卡 1400)
&__aside {
.flex(column, flex-start, stretch);
gap: 6px;
@@ -66,13 +58,12 @@ onMounted(() => {
margin-right: 0;
}
// 右内容卡 1400:白底 + 浅灰描边
&__main {
flex: 1 1 auto;
min-width: 0;
min-height: 425px;
margin-left: 40px; // 左列 200 → 右卡起点 240(设计稿比例:160/245 ≈ 0.65)
padding: 24px 24px 0; // 卡内左缩进:卡 → 标题 +28
margin-left: 40px;
padding: 24px 24px 0;
border: 1px solid @profile-card-border;
border-radius: @radius-lg;
background: @white;

View File

@@ -112,7 +112,6 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计 17(资质列表):标题蓝条、整行白卡单列、分页靠右
.qual-page {
.flex(column, flex-start);
gap: @spacing-base;
@@ -127,7 +126,7 @@ onMounted(() => {
&__title {
position: relative;
padding-left: 12px;
font-size: 12px; // 设计 15 → 12
font-size: 12px;
font-weight: 700;
color: @heading-color;
line-height: 20px;
@@ -169,7 +168,6 @@ onMounted(() => {
color: @primary-strong;
}
// 顶部「+ 新增资质」:小号蓝底按钮(设计 17 实取 #024FFF)
.app-button--primary {
height: 24px;
padding: 0 10px;

View File

@@ -15,12 +15,10 @@ const router = useRouter()
const profileStore = useProfileStore()
const { profile } = storeToRefs(profileStore)
// ── 注销账号二次确认(设计稿 __4d03fd89:风险提示 + 注销条件 + 双按钮) ──
const deleteVisible = ref(false)
const agree = ref(false)
const identityVisible = ref(false)
/** 注销条件(mock 全部满足) */
const conditions = [
{ label: '账号无未完成的订单', ok: true },
{ label: '账号无未结清的款项', ok: false },
@@ -28,7 +26,6 @@ const conditions = [
{ label: '账号无处理中的工单', ok: true },
]
/** 注销风险提示(设计稿 __4d03fd89 原文四条) */
const risks = [
'账号注销后,您将无法登录本应用,所有个人信息将被永久删除。',
'您名下的订单、合同、工单等业务数据将一并清除,无法找回。',
@@ -41,11 +38,9 @@ function onDeleteConfirm(): void {
ElMessage.warning('请先阅读并同意《账号注销协议》')
return
}
// 安全身份验证 → 验证通过后注销
identityVisible.value = true
}
// ── 修改密码 ──
const pwdVisible = ref(false)
function onChangePasswordSubmit(payload: { code: string; password: string; confirm: string }): void {
@@ -64,7 +59,6 @@ function onChangePasswordSubmit(payload: { code: string; password: string; confi
})
}
// ── 绑定/换绑(手机 & 邮箱) ──
const bindVisible = ref(false)
const bindMode = ref<BindContactMode>('phone-rebind')
@@ -88,14 +82,12 @@ function onBindSubmit(payload: { contact: string; code: string }): void {
})
}
// ── 取消绑定邮箱 ──
const unbindVisible = ref(false)
function onUnbindConfirm(): void {
void profileStore.unbindEmail()
}
// ── 注销账号 ──
function onIdentitySubmit(payload: { contact: string; code: string }): void {
void (async () => {
await profileStore.verifyIdentity(payload.contact, payload.code)
@@ -118,7 +110,6 @@ function onIdentitySubmit(payload: { contact: string; code: string }): void {
@delete-account="deleteVisible = true"
/>
<!-- 注销账号 · 二次确认(设计稿 __4d03fd89) -->
<ConfirmDialog
v-model:visible="deleteVisible"
title="注销账号"
@@ -210,11 +201,6 @@ function onIdentitySubmit(payload: { contact: string; code: string }): void {
gap: @spacing-base;
}
// 设计稿(注销账号 __4d03fd89):
// 弹层内容列 x660→1420 宽 760;感叹号 30/700 #EF4444;主问 19/700 #1F2937
// 风险标题 13/600 #EF4444;正文 13/400 #4B5563 行距 26
// 条件行 760×32 底 #FFFFFF bd #DDE1E7;勾选标记 14 圆底
// 协议勾选框 16;取消按钮 760×46 底 #D8DBDF;注销按钮 760×46 底 #EF4444
.delete-confirm {
.flex(column, flex-start);
align-items: center;

View File

@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { AppButton, FileList } from '@/components'
// 页面容器:数据只经 store,不直接 import api
import { useProjectStore } from '@/stores/modules/project'
import { useOssStore } from '@/stores/modules/oss'
import type { FileInfo } from '@/types/api'
@@ -18,13 +17,6 @@ const { current } = storeToRefs(projectStore)
const projectId = computed(() => String(route.params.id))
/**
* 售后类型候选(**下拉框的值域**)。
*
* <p>⚠️ 库内**没有「售后类型」字典**(`aftersales_status` 是售后状态、`vm_requirement_business_type`
* 是项目业务类型,都不是它)⇒ 先在前端固定这 8 项。后端补上字典 / 选项接口后,
* 只需把这里换成接口驱动(`TYPE_OPTIONS` 改为 ref 接收接口数据),其余逻辑不用动。</p>
*/
const TYPE_OPTIONS = [
'软件 BUG 修复',
'软件 / 固件功能迭代',
@@ -37,11 +29,9 @@ const TYPE_OPTIONS = [
]
const type = ref('')
/** 选中的项目(= 需求 id;提交时下发给后端,由它按此定位项目) */
const selectedProjectId = ref(projectId.value)
const description = ref('')
const remark = ref('')
/** 已上传到 OSS 的附件(携带 ossId,提交时进 `attachmentOssIds`) */
const attachments = ref<AfterSalesAttachment[]>([])
const uploading = ref(false)
const submitting = ref(false)
@@ -51,16 +41,11 @@ const fileInputRef = ref<HTMLInputElement | null>(null)
const descriptionCount = computed(() => `${description.value.length}/500`)
const remarkCount = computed(() => `${remark.value.length}/500`)
/** 项目名称下拉的候选:先取**已完成项目**,再把当前项目兜底并入 */
const projectOptions = computed(() => {
const options = projectStore.completedProjects.map((item) => ({
id: String(item.id),
// 项目名称为空时退回编号,避免下拉出现空白项
label: item.projectName || item.projectNo || '未命名项目',
}))
// 当前项目理论上必然已完成(详情页只有已完成才给「申请售后」入口);
// 但「列表接口结果」与「详情状态」可能因刚变更而不同步 ⇒ 兜底并入,
// 否则 v-model 命不中任何 option,下拉会显示成空白。
if (projectId.value && !options.some((item) => item.id === projectId.value)) {
options.unshift({
id: projectId.value,
@@ -71,7 +56,6 @@ const projectOptions = computed(() => {
})
function resetForm(): void {
// 项目名称回到默认(当前项目),其余清空
selectedProjectId.value = projectId.value
type.value = ''
description.value = ''
@@ -87,12 +71,6 @@ function pickFiles(): void {
fileInputRef.value?.click()
}
/**
* 选完文件后逐个上传到 OSS。
*
* <p>上传接口一次只收一个 `file` 字段,所以串行上传;全部成功后才进列表
* (失败的文件不会留下半条记录)。</p>
*/
async function onFilesPicked(list: FileList | null): Promise<void> {
if (!list || list.length === 0) return
uploading.value = true
@@ -107,19 +85,16 @@ async function onFilesPicked(list: FileList | null): Promise<void> {
}
finally {
uploading.value = false
// 清空 input,允许再次选择同一个文件
if (fileInputRef.value) fileInputRef.value.value = ''
}
}
function removeAttachment(file: FileInfo): void {
// FileList 回传的就是列表里的同一个对象引用;用引用定位,避免同名同大小文件删错一条
const index = attachments.value.indexOf(file as AfterSalesAttachment)
if (index >= 0) attachments.value.splice(index, 1)
}
function previewAttachment(file: FileInfo): void {
// 同源预览:有 ossId 走后端 inline 接口,绕开 OSS 桶「强制下载」
ossStore.openPreview(file)
}
@@ -138,12 +113,6 @@ function downloadAttachment(file: FileInfo): void {
document.body.removeChild(link)
}
/**
* 提交申请。
*
* <p>提交的 `id` 是「项目名称」下拉**选中的项目**(默认当前项目)——后端只按这个需求 id 定位
* 项目并校验「已完成」,所以切换项目后提交的就是那个项目的售后。附件下发 `ossId` 列表,由后端转存。</p>
*/
async function onSubmit(): Promise<void> {
if (!selectedProjectId.value) {
ElMessage.warning('请选择项目名称')
@@ -168,7 +137,6 @@ async function onSubmit(): Promise<void> {
await router.push(`/project/${selectedProjectId.value}`)
}
catch (error) {
// 统一 request 层已弹错误提示(如「只有已完成的项目可以申请售后」),这里只恢复按钮
console.warn('[after-sales] 售后申请提交失败', error)
}
finally {
@@ -180,14 +148,12 @@ onMounted(() => {
if (!current.value || current.value.id !== projectId.value) {
void projectStore.fetchDetail(projectId.value)
}
// 「项目名称」下拉的值域(已完成项目);每次进页面都重拉,项目状态会变
void projectStore.fetchCompletedProjects()
})
</script>
<template>
<div class="container after-sales">
<!-- 设计 12:页面顶部面包屑(与项目详情页同款) -->
<nav class="after-sales__breadcrumb">
<RouterLink to="/project" class="link">
项目中心
@@ -205,7 +171,6 @@ onMounted(() => {
</p>
</header>
<!-- ① 选择业务类型 -->
<section class="after-sales__card">
<h2 class="after-sales__card-title">
<span class="after-sales__step">1</span>
@@ -230,7 +195,6 @@ onMounted(() => {
</div>
</section>
<!-- ② 填写问题描述 -->
<section class="after-sales__card">
<h2 class="after-sales__card-title">
<span class="after-sales__step">2</span>
@@ -300,7 +264,6 @@ onMounted(() => {
</div>
</section>
<!-- ③ 补充备注 -->
<section class="after-sales__card">
<h2 class="after-sales__card-title">
<span class="after-sales__step">3</span>
@@ -320,7 +283,6 @@ onMounted(() => {
</div>
</section>
<!-- 底部操作条(设计稿:左侧提示 + 右侧 取消 / 重置 / 申请售后) -->
<footer class="after-sales__footer">
<p class="after-sales__footer-tip">
<span class="after-sales__footer-icon" aria-hidden="true">i</span>
@@ -342,18 +304,11 @@ onMounted(() => {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1,规格 项目详情__4ed7159e):
// 面包屑 (70,116) 24/500 #666666;主标题 (70,196) 22/700 #1F2937;副标题 (66,233) 13/400 #6B7280;
// 步骤标题 (126,299) 15/700,序号圆 (94,294) 21×21 #024FFF 12/700 白字;
// 字段标签 (87.5,336) 13/500、输入框 (94,361) 1732×39;文本域 (94,623) 1732×130;
// 附件区 (70,456) 1780×499 白底、文件行 (94,813) 1732×55 #F7F8FA;
// 底栏 (0,1238) 1920×80 + 顶部分隔线 (0,1238) 1px #F0F1F3;按钮 (1409,1258) 254×38 底 #075CFF。
.after-sales {
.flex(column, flex-start, stretch);
padding-bottom: 104px; // 固定底栏 80 + 呼吸 24
padding-bottom: 104px;
background: @white;
// 设计 ink 116(页头 72 + 44);行高 27 → 盒顶 ≈113
&__breadcrumb {
padding-top: 41px;
font-size: 24px;
@@ -362,13 +317,11 @@ onMounted(() => {
color: @project-breadcrumb;
}
// 面包屑盒底 140 → 主标题盒顶 192
&__header {
.flex(column, flex-start, stretch);
padding-top: 52px;
}
// 主标题 22/700,行高 29
&__title {
margin: 0;
font-size: 22px;
@@ -377,7 +330,6 @@ onMounted(() => {
color: @project-ink;
}
// 副标题 13/400,行高 17(顶 233 = 标题底 225 + 8)
&__subtitle {
margin-top: 8px;
font-size: 13px;
@@ -386,7 +338,6 @@ onMounted(() => {
color: @project-label;
}
// 卡内上下留白:卡1 顶 276 → 序号圆 298(22);select 底 400 → 卡1 底 440(40)
&__card {
.flex(column, flex-start, stretch);
margin-top: 30px;
@@ -395,16 +346,14 @@ onMounted(() => {
box-sizing: border-box;
}
// 卡1 底 440 → 卡2 顶 456(16);卡2 底 955 → 卡3 顶 971(16)
&__card + &__card {
margin-top: 16px;
}
// 卡片标题:(126,299) 15/700 + 序号圆 (94,294) 21×21
&__card-title {
.flex(row, flex-start, center);
gap: 11px; // 126 − (94+21) = 11
padding-left: 24px; // 序号落 x94 = 内容区 70 + 24(01 段)
padding-left: 24px;
font-size: 15px;
font-weight: 700;
line-height: 20px;
@@ -424,11 +373,10 @@ onMounted(() => {
line-height: 1;
}
// 01 段:标题底 319 → 首个字段标签 336(+17);02/03 段:标题在 (126,479)/(118.5,994)
&__field {
.flex(column, flex-start, stretch);
position: relative;
gap: 8px; // 标签底 353 → 框顶 361
gap: 8px;
}
&__field:first-of-type {
@@ -436,10 +384,9 @@ onMounted(() => {
}
&__field + &__field {
margin-top: 19px; // 框底 400 → 下一标签 419(02 段)
margin-top: 19px;
}
// 02 段「项目名称」框底 580 → 「问题描述」标签 598
&__field + &__field:has(+ &__field) {
margin-top: 19px;
}
@@ -455,7 +402,6 @@ onMounted(() => {
color: @project-muted;
}
// 「上传文件」推到行尾
&__upload-btn {
margin-left: auto;
}
@@ -478,7 +424,6 @@ onMounted(() => {
}
}
// 字段标签 13/500,整行铺满(落到内容区 x70)
&__label {
font-size: 13px;
font-weight: 500;
@@ -493,7 +438,6 @@ onMounted(() => {
font-weight: inherit;
}
// 输入框 / 下拉:设计 1732×39、白底描边 #DDE1E7、圆角 8
&__select {
width: 100%;
height: 39px;
@@ -522,14 +466,12 @@ onMounted(() => {
border-color: @primary-color;
}
// 设计:项目名称 = 灰底填充(#F3F4F6),无描边
&--filled {
border-color: transparent;
background-color: @project-field-bg;
}
}
// 文本域:设计 1732×130、白底描边 #DDE1E7、圆角 8
&__textarea {
width: 100%;
height: 130px;
@@ -554,7 +496,6 @@ onMounted(() => {
}
}
// 字数统计在文本域内部右下角(设计 (1770.5,726) 11/400)
&__count {
position: absolute;
right: 13px;
@@ -568,7 +509,6 @@ onMounted(() => {
display: none;
}
// ── 底部固定操作条(设计 1920×80、白底、顶部分隔线 #F0F1F3) ──
&__footer {
position: fixed;
right: 0;
@@ -579,12 +519,11 @@ onMounted(() => {
gap: @spacing-base;
height: 80px;
box-sizing: border-box;
padding: 0 121px 0 170px; // 提示 x170、按钮右缘 x1791
padding: 0 121px 0 170px;
border-top: 1px solid @project-divider;
background: @white;
}
// 底栏提示:(93.99,1266) 12/400 #4B5563 + i 图标 (76.66,1267)
&__footer-tip {
.flex(row, flex-start, center);
gap: 8px;
@@ -611,7 +550,6 @@ onMounted(() => {
gap: 8px;
flex-shrink: 0;
// 设计:三键同高 38、圆角 8、字号 13/500
:deep(.app-button) {
height: 38px;
padding: 0 18px;
@@ -642,7 +580,6 @@ onMounted(() => {
}
}
// 附件行:设计 (94,813) 1732×55、底 #F7F8FA、圆角 8
:deep(.file-list) {
gap: 10px;
}

View File

@@ -7,9 +7,7 @@ import type { FileInfo } from '@/types/api'
import type { AfterSales, ProjectStatus } from '@/types/business/project'
interface Props {
/** 售后工单;`undefined` 或 `status === '无'` 表示没有进行中的工单 */
afterSales?: AfterSales
/** 项目状态 —— 决定售后区的三态展示(见下方模板注释) */
projectStatus: ProjectStatus
}
@@ -22,25 +20,10 @@ const emit = defineEmits<{
const ossStore = useOssStore()
/**
* 售后页签的三态(设计稿便签原文):
* 1. 项目**未完成** → 不展示售后信息;
* 2. 已完成 + **未提交**售后 → 内容为空,只给「申请售后」;
* 3. 已完成 + **已提交**售后 → 展示售后信息 + 「取消售后」。
*
* <p>「已完成」按详情页状态口径判定(后端 `COMPLETED` 经 projectVo 映射成「已完成」)。
* 后端 `requestAfterSale` 也会校验这一点,前端只是提前把入口藏掉。</p>
*/
const isCompleted = computed(() => props.projectStatus === '已完成')
/** 存在进行中的售后工单(撤回后的记录在映射层已归为「无」) */
const hasTicket = computed(() => props.afterSales?.status === '处理中')
/**
* 预览 / 下载直接走附件自身的 OSS 地址(后端下发的 `url` 就是可访问地址);
* 删除没有接口 —— 售后附件只在「申请 / 完成售后」时整体写入,不支持单独删。
*/
function previewFile(file: FileInfo): void {
// 同源预览:有 ossId 走后端 inline 接口,绕开 OSS 桶「强制下载」
ossStore.openPreview(file)
}
@@ -67,16 +50,13 @@ function onDeleteFile(): void {
<template>
<section class="project-after-sales">
<!-- 规则 1:项目未完成 → 不展示售后信息 -->
<div v-if="!isCompleted" class="project-after-sales__blank">
<p class="project-after-sales__blank-text text-secondary">
项目完成后可申请售后
</p>
</div>
<!-- 规则 3:已完成 + 已提交售后 → 工单横幅 + 售后信息 + 取消售后 -->
<template v-else-if="hasTicket && afterSales">
<!-- 设计 10:整宽浅红提示横幅,只有标题 + 说明两行,无图标 -->
<div class="project-after-sales__banner">
<div class="project-after-sales__banner-text">
<h3 class="project-after-sales__banner-title">
@@ -133,7 +113,6 @@ function onDeleteFile(): void {
</div>
</template>
<!-- 规则 2:已完成 + 未提交售后 → 内容为空 + 申请售后 -->
<template v-else>
<div class="project-after-sales__blank">
<p class="project-after-sales__blank-text text-secondary">
@@ -153,24 +132,16 @@ function onDeleteFile(): void {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1):横幅 (70,342) 1780×96 底 #FDEEEE;
// 标题 (96,367.5) 17/700 #D93025;说明 (96,395.5) 13/400 #4B5563;
// 区块标题 (82,468) 15/700;字段标签 (63.5,508) 13/500 #1F2937(整行铺满 → 实际落 x70);
// 只读框 (70,533) 1780×39 底 #F3F4F6 描边 #DDE1E7;文本域 (70,615) 1780×130;
// 附件标题 (70,768.5) 13/500 + 提示 (149,769.5) 11/400 #9CA3AF + 「上传文档」(1801.4,769) 12/500;
// 文件行 (70,805) 1780×55 #F7F8FA;操作 (1628,968)/(1754,968) 15/500 白字 —— 底部按钮。
.project-after-sales {
.flex(column, flex-start, stretch);
padding: 0;
// ── 顶部工单横幅 ──
// 页签分割线 317 → 横幅顶 342(25)
&__banner {
.flex(row, flex-start, center);
height: 96px;
box-sizing: border-box;
margin-top: 25px;
padding-left: 26px; // 文字 x96 = 内容区 x70 + 26
padding-left: 26px;
border-radius: 0;
background: @project-banner-soft;
}
@@ -180,7 +151,6 @@ function onDeleteFile(): void {
min-width: 0;
}
// 横幅标题 17/700,行高 22(顶 367.5 = 横幅 342 + 25.5)
&__banner-title {
margin: 0;
padding-top: 0;
@@ -190,7 +160,6 @@ function onDeleteFile(): void {
color: @project-banner-title;
}
// 说明 13/400(顶 395.5 = 标题底 389.5 + 6)
&__banner-desc {
margin-top: 6px;
font-size: 13px;
@@ -199,11 +168,10 @@ function onDeleteFile(): void {
color: @project-cell;
}
// ── 「售后信息」区块标题 ──
&__title {
.section-title();
margin-top: 0;
padding-left: 12px; // 文字落 x82
padding-left: 12px;
font-size: 15px;
font-weight: 700;
line-height: 20px;
@@ -214,35 +182,28 @@ function onDeleteFile(): void {
}
}
// 横幅底 438 → 标题 468;标题底 488 → 字段。
// 后代表达式:紧邻横幅的标题额外上抬 —— 用统一节距表达(见下方 padding)
&__banner + &__title {
margin-top: 30px;
}
// 标题盒底 484.5 → 首标签盒顶 505(20.5)
&__title + &__field {
margin-top: 20.5px;
}
&__field {
.flex(column, flex-start, stretch);
gap: 5px; // 标签盒底 528 → 只读框顶 533
gap: 5px;
}
// 框底 → 下一标签盒顶:ro1 底 572 → 标签2 586.5(14.5);ro2 底 745 → 标签3 765(20)
&__field + &__field {
margin-top: 14.5px;
}
// 第三个字段(附件)上距略大:设计 ro2 底 745 → 标签3 768.5
// 注意:字段在 section 里是第 3/4/5 个子元素(前面还有 banner、title),所以是 nth-child(5)
&__field:nth-child(5) {
margin-top: 23px;
gap: 20px; // 标签行盒底 785 → 首行附件 805
gap: 20px;
}
// 设计:标签与提示同行
&__field-head {
.flex(row, flex-start, center);
gap: 14px; // 149 − (70+65) = 14
@@ -254,7 +215,6 @@ function onDeleteFile(): void {
color: @project-muted;
}
// 字段标签 13/500
&__label {
font-size: 13px;
font-weight: 500;
@@ -262,11 +222,10 @@ function onDeleteFile(): void {
color: @project-ink;
}
// 只读展示:设计 1780×39、底 #F3F4F6、描边 1px #DDE1E7、圆角 8
&__readonly {
.flex(row, flex-start, center);
min-height: 39px;
padding: 0 13px; // 值 x83 = 内容区 70 + 13
padding: 0 13px;
border: 1px solid @project-input-border;
border-radius: 8px;
background: @project-field-bg;
@@ -299,7 +258,6 @@ function onDeleteFile(): void {
font-size: @font-size-body;
}
// 末行附件 925(870+55)→ 按钮盒顶 955(30)
&__actions {
.flex(row, flex-end, center);
gap: 42px; // 1754 − (1628+84) = 42
@@ -337,7 +295,6 @@ function onDeleteFile(): void {
}
}
// 附件行:公共 FileList 外观覆写(设计 1780×55、底 #F7F8FA、圆角 8)
:deep(.file-list) {
gap: 10px;
}

View File

@@ -8,7 +8,6 @@ interface Props {
defineProps<Props>()
// ⚠️ 详情页只「展示」文件,不提供上传入口(上传在需求提报页)。
const emit = defineEmits<{
delete: [index: number]
preview: [index: number]
@@ -18,8 +17,6 @@ const emit = defineEmits<{
<template>
<section class="project-files">
<!-- 设计稿(785b3eb8)本页签**没有区块标题**,文件行直接起于分割线下方 24px;
标题只保留给读屏,视觉隐藏。 -->
<h2 class="project-files__title">
项目文件
</h2>
@@ -59,14 +56,10 @@ const emit = defineEmits<{
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1):无区块标题,文件行直接起于 (70,342);
// 行 1780×55 底 #F7F8FA、接缝 10;类型徽标 (87,352) 33×21;文件名 (130,352) 13px;
// 副行 (130,372) 11px #9CA3AF;操作 (1748,361) 12px #6B7280(预览 / 下载),右缘 x1845。
.project-files {
.flex(column, flex-start, stretch);
padding: 0;
// 设计稿无可见标题:仅读屏可读(不占位)
&__title {
position: absolute;
width: 1px;
@@ -81,16 +74,15 @@ const emit = defineEmits<{
&__list {
.flex(column, flex-start, stretch);
gap: 10px;
margin-top: 24px; // 分割线 317 → 首行顶 342(785b3eb8)
margin-top: 24px;
}
// 整行通铺 #F7F8FA、圆角 8,行高 55(内容 35 + 上下 10)
&__item {
.flex(row, space-between, center);
gap: @spacing-base;
height: 55px;
box-sizing: border-box;
padding: 0 5.6px 0 17px; // 徽标左缘 87 = 内容区 70 + 17;操作右缘 1845 = 1850 − 5
padding: 0 5.6px 0 17px;
border-radius: 8px;
background: @finance-row-bg;
}
@@ -117,7 +109,7 @@ const emit = defineEmits<{
&__actions {
.flex(row, flex-end, center);
gap: 14px; // 1748.39 → 1805.33 实测节距 57/40 → 用文字宽 + 14
gap: 14px;
flex-shrink: 0;
}

View File

@@ -3,20 +3,8 @@ import { computed, ref } from 'vue'
import { PROJECT_STATUS_LABEL, PROJECT_STATUS_OPTIONS, PROJECT_TIME_OPTIONS } from '@/utils/projectMeta'
import type { ProjectQuery, ProjectTypeCount } from '@/types/business/project'
/**
* 项目中心左侧筛选栏(按项目中心设计稿还原)。
*
* <p>⚠️ 业务类型的**值域、文案、件数全部来自 store**(`typeCounts` ← `GET /web/requirementPool/getFilterConditions`
* 的 `businessTypeCounts`,全量口径),组件内不定义业务值域;
* 只有后端未下发的组(项目状态 / 提交时间)才用 `utils/projectMeta.ts` 里的前端常量。</p>
*
* <p>「不限」统一用**空值**表示(不是 'all'):业务类型用空数组、其余用空串,
* 都不会出现在 querystring 里,正好对上后端「有值才匹配」的语义。</p>
*/
interface Props {
query: ProjectQuery
/** 当前筛选命中的项目数(确定筛选按钮上的「N个结果」) */
total: number
typeCounts: ProjectTypeCount[]
}
@@ -34,7 +22,6 @@ const emit = defineEmits<{
reset: []
}>()
/** 自选时间区间是否展开(设计稿只给了按钮态,展开后是两个原生日期输入) */
const rangeOpen = ref(false)
const rangeLabel = computed(() => {
@@ -45,7 +32,6 @@ const rangeLabel = computed(() => {
const chips = computed<Chip[]>(() => {
const list: Chip[] = []
// 业务类型是**多选**:每个已选类型各出一个 chip,key 带 id 以便单独移除
props.query.businessTypes.forEach((value) => {
const found = props.typeCounts.find((item) => item.value === value)
list.push({ key: `businessType:${value}`, label: found?.label ?? value })
@@ -67,14 +53,12 @@ function patch(partial: Partial<ProjectQuery>): void {
emit('update:query', { ...props.query, ...partial })
}
/** 业务类型行是否处于选中态(「全部」= 一个都没勾) */
function isTypeSelected(value: string): boolean {
return value === 'all'
? props.query.businessTypes.length === 0
: props.query.businessTypes.includes(value)
}
/** 业务类型多选切换:点「全部」清空,点具体行按勾选状态增删(后端口径是 IN,多选即并集) */
function onToggleType(value: string): void {
if (value === 'all') {
patch({ businessTypes: [] })
@@ -88,13 +72,11 @@ function onToggleType(value: string): void {
})
}
/** 快捷区间与自选区间互斥:点快捷区间会清掉自选日期 */
function onPickShortcut(value: ProjectQuery['timeShortcut']): void {
rangeOpen.value = false
patch({ timeShortcut: value, startDate: '', endDate: '' })
}
/** 选了自选日期就把快捷区间复位(避免两组条件同时生效) */
function onPickDate(partial: { startDate?: string; endDate?: string }): void {
patch({ timeShortcut: 'all', ...partial })
}
@@ -127,7 +109,6 @@ function onClearChips(): void {
筛选条件
</h2>
<!-- 业务类型:**多选**(值域 / 件数均来自后端统计;「全部」= 清空选择,可单选或多选) -->
<section class="project-filter__group">
<h3 class="project-filter__group-title">
业务类型
@@ -148,7 +129,6 @@ function onClearChips(): void {
</ul>
</section>
<!-- 项目状态:2 列胶囊网格 -->
<section class="project-filter__group">
<h3 class="project-filter__group-title">
项目状态
@@ -167,7 +147,6 @@ function onClearChips(): void {
</div>
</section>
<!-- 提交时间:快捷区间 + 自选区间 -->
<section class="project-filter__group">
<h3 class="project-filter__group-title">
提交时间
@@ -211,7 +190,6 @@ function onClearChips(): void {
</div>
</section>
<!-- 已选条件 -->
<section class="project-filter__chips">
<div class="project-filter__chips-head">
<span class="project-filter__chips-title">已选条件({{ chips.length }}个)</span>
@@ -237,7 +215,6 @@ function onClearChips(): void {
</div>
</section>
<!-- 底部操作 -->
<div class="project-filter__actions">
<button
type="button"
@@ -259,7 +236,6 @@ function onClearChips(): void {
<style lang="less" scoped>
.project-filter {
// 左栏固定宽(设计稿实测 313 / 卡片间距 17 / 容器 1353)
flex: 0 0 313px;
padding: 20px 28px 24px;
border-radius: @radius-base;
@@ -287,7 +263,6 @@ function onClearChips(): void {
color: @heading-color;
}
// ── 业务类型列表 ──
&__list {
display: flex;
flex-direction: column;
@@ -324,7 +299,6 @@ function onClearChips(): void {
background: @white;
transition: background-color 0.2s, border-color 0.2s;
// 勾:用两条边框旋转 45° 画出来,不引额外图标
&::after {
content: '';
position: absolute;
@@ -339,7 +313,6 @@ function onClearChips(): void {
}
}
// 选中行:方框实心主色 + 白色勾(多选下每行独立显隐)
&__row.is-active &__box {
border-color: @primary-color;
background: @primary-color;
@@ -362,7 +335,6 @@ function onClearChips(): void {
color: @text-color;
}
// ── 胶囊网格(项目状态 / 提交时间)──
&__grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -392,7 +364,6 @@ function onClearChips(): void {
}
}
// ── 自选日期区间(点开后才出现)──
&__range {
.flex(row, space-between, center);
margin-top: 9px;
@@ -415,7 +386,6 @@ function onClearChips(): void {
color: @text-color-secondary;
}
// ── 已选条件 ──
&__chips {
margin-top: 18px;
padding: 12px;
@@ -466,7 +436,6 @@ function onClearChips(): void {
margin-left: 4px;
}
// ── 底部操作 ──
&__actions {
.flex(row, space-between, center);
margin-top: 16px;

View File

@@ -18,28 +18,16 @@ const emit = defineEmits<{
download: [file: FileInfo]
}>()
/**
* 是否可跳收银台支付。
*
* <p>用「待支付 + id 是纯数字」判断,而不是过去的「来源是账单」——本栈的支付口径就是
* **计划 id**(收银台 `?ids=` 与 `vm_finance_payment.bill_id` 同一口径),计划卡本就该能付;
* 数字校验只是防止空 id 拼出 `?ids=`。</p>
*/
function canPay(bill: ProjectBill): boolean {
return bill.status === '待支付' && /^\d+$/.test(bill.id)
}
/**
* 三态配色类(设计稿口径,挂到 `.project-finance__plan` 上,由后代选择器分发):
* 已支付 = 绿、待支付 = 橙、未到期 = 灰,**徽标实底 + 金额文字同色**。
*/
const TONE_CLASS: Record<ProjectBill['status'], string> = {
'已支付': 'is-paid',
'待支付': 'is-pending',
'未到期': 'is-idle',
}
/** 文件行副标题(设计稿:「2.4MB · 上传于 2026-8-17 17:00」) */
function fileMeta(file: FileInfo): string {
const size = file.size ? formatFileSize(file.size) : ''
const time = file.uploadTime ? `上传于 ${file.uploadTime}` : ''
@@ -49,7 +37,6 @@ function fileMeta(file: FileInfo): string {
<template>
<section class="project-finance">
<!-- 付款计划(数据源 vm_bill_plan):卡内三态 = 已支付 / 待支付 / 未到期 -->
<h2 class="project-finance__title">
付款计划
</h2>
@@ -69,7 +56,6 @@ function fileMeta(file: FileInfo): string {
<div class="project-finance__plan-body">
<div class="project-finance__fields">
<!-- 交易流水号只在已支付时出现(设计稿:已支付那张卡多一行流水号) -->
<p v-if="bill.status === '已支付' && bill.tradeNo" class="project-finance__field">
交易流水号:{{ bill.tradeNo }}
</p>
@@ -85,7 +71,6 @@ function fileMeta(file: FileInfo): string {
</div>
</div>
<!-- 支付口径 = 计划 id(与收银台 ?ids= / vm_finance_payment.bill_id 一致) -->
<button
v-if="canPay(bill)"
class="project-finance__pay"
@@ -100,7 +85,6 @@ function fileMeta(file: FileInfo): string {
</p>
</div>
<!-- 发票记录 -->
<h2 class="project-finance__title">
发票记录
</h2>
@@ -134,7 +118,6 @@ function fileMeta(file: FileInfo): string {
</li>
</ul>
<!-- 合同文件 -->
<h2 class="project-finance__title">
合同文件
</h2>
@@ -165,15 +148,10 @@ function fileMeta(file: FileInfo): string {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1):标题 (82,342) 15/700;计划卡 (70,380) 372×139 / (70,533) 372×144 /
// (70,691) 372×116,描边 1px #F0F1F3、圆角 13;期次名 (89,398) 14/700;状态 (378,400) 11/500;
// 字段行 (89,426) 11/400 #6B7280;金额 (341.33,453) 20/700;「立即支付」通栏 372×34 #F59E0B;
// 发票记录标题 (82,841)、合同文件标题 (82,1033);文件行 1780×55 #F7F8FA。
.project-finance {
.flex(column, flex-start, stretch);
padding: 0;
// 分割线 317 → 「付款计划」盒 339(ink 342,843103b2)
&__title {
.section-title();
margin-top: 22px;
@@ -188,32 +166,25 @@ function fileMeta(file: FileInfo): string {
}
}
// 首区块标题盒底 359 → 首张卡顶 380
&__title:first-child + &__plans {
margin-top: 21px;
}
// 区块间距:付款计划卡底 807 → 「发票记录」盒 838(31);发票行底 999 → 「合同文件」盒 1030(31)
&__plans + &__title,
&__files + &__title {
margin-top: 31px;
}
// 区块标题盒底 → 首行顶:838+20 → 879(21);1030+20 → 1071(21)
&__title + &__files,
&__title + &__file {
margin-top: 21px;
}
// ---------- 付款计划 ----------
// 卡片竖排单列、定宽 372 左对齐;卡间距 14(380→533→691 实测 153/158,扣卡高)
&__plans {
.flex(column, flex-start, flex-start);
gap: 14px;
}
// 白底 + 1px #F0F1F3 描边、圆角 13,定宽 372;内容内缩 19/17
&__plan {
.flex(column, flex-start, stretch);
position: relative;
@@ -223,24 +194,20 @@ function fileMeta(file: FileInfo): string {
border-radius: 13px;
background: @white;
box-sizing: border-box;
gap: 0; // 段间距全部走显式 margin,避免 gap 与 margin 叠加
gap: 0;
// 带「立即支付」时按钮贴卡片下缘:底部不留内边距
&:has(.project-finance__pay) {
padding-bottom: 0;
}
// 两条字段、无支付按钮(卡3):底距 17(设计卡高 116 = 2+17+19+8+53+17)
&:not(:has(.project-finance__field:nth-child(3))):not(:has(.project-finance__pay)) {
padding-bottom: 17px;
}
// 三条字段、无支付按钮(卡1):底距 15(设计卡高 139 = 2+17+19+8+78+15)
&:has(.project-finance__field:nth-child(3)):not(:has(.project-finance__pay)) {
padding-bottom: 15px;
}
// 三态配色(浅底徽标 + 同色系金额)
&.is-paid {
.project-finance__badge {
color: @finance-paid;
@@ -277,7 +244,6 @@ function fileMeta(file: FileInfo): string {
gap: @spacing-sm;
}
// 期次标题 14/700,行高 19(顶 398 = 卡内 380+18)
&__plan-name {
font-size: 14px;
font-weight: 700;
@@ -286,7 +252,6 @@ function fileMeta(file: FileInfo): string {
.ellipsis();
}
// 状态纯文字(设计 11/500)
&__badge {
.flex(row, center, center);
flex-shrink: 0;
@@ -296,24 +261,18 @@ function fileMeta(file: FileInfo): string {
white-space: nowrap;
}
// 金额是**文本覆盖层**,不参与卡高:设计里它压在字段区右侧、与首字段行齐平
// (ink 453 = 卡顶 380 + 73;字段盒顶 424 + 29)。必须 absolute,否则 26 高的
// 行盒会把 __plan-body 撑高,三张卡分别虚高 8/8/0。
&__plan-body {
.flex(row, space-between, flex-start);
position: relative;
margin-top: 8px; // 期次行盒底 416 → 字段块顶 424
margin-top: 8px;
gap: @spacing-base;
}
// 字段块按内容定高(3 行 78 / 2 行 53),行距由绝对偏移给,避免 margin 叠加。
// 设计:卡1 424→502(3 行 0/23/61),卡2 564→617、卡3 729→782(2 行 0/23)。
&__fields {
position: relative;
flex: 0 0 auto;
min-width: 0;
// 3 行时块高 78,2 行时 53
height: 53px;
&:has(> :nth-child(3)) {
@@ -330,7 +289,6 @@ function fileMeta(file: FileInfo): string {
color: @project-label;
.ellipsis();
// 字段行距:426 → 449 → 487(相对块顶 0 / 23 / 61)
&:nth-child(1) { top: 0; }
&:nth-child(2) { top: 23px; }
@@ -338,7 +296,6 @@ function fileMeta(file: FileInfo): string {
&:nth-child(3) { top: 61px; }
}
// 金额 20/700:设计 ink 453(卡顶 380 + 73),相对首字段行盒顶(424)再下移 29
&__amount {
position: absolute;
top: 29px;
@@ -350,8 +307,6 @@ function fileMeta(file: FileInfo): string {
white-space: nowrap;
}
// 「立即支付」:设计卡内通铺 370×34、贴卡片下缘。
// 卡2:字段块底 617 → 按钮顶 642(间距 25),按钮底 676,卡底 677。
&__pay {
height: 34px;
margin: 11px -19px 0;
@@ -369,9 +324,6 @@ function fileMeta(file: FileInfo): string {
}
}
// ---------- 发票 / 合同文件 ----------
// 发票行间距 10(879→944 / 1071→1136)
&__files {
.flex(column, flex-start, stretch);
gap: 10px;
@@ -380,18 +332,16 @@ function fileMeta(file: FileInfo): string {
list-style: none;
}
// 整行通铺 #F7F8FA、圆角 8,行高 55
&__file {
.flex(row, space-between, center);
gap: @spacing-base;
height: 55px;
box-sizing: border-box;
padding: 0 5.7px 0 16px; // 徽标左缘 86 = 内容区 70 + 16;操作右缘 x1845
padding: 0 5.7px 0 16px;
border-radius: 8px;
background: @finance-row-bg;
}
// 文件类型方块(设计 ≈33×21)
&__file-badge {
.flex(row, center, center);
flex-shrink: 0;

View File

@@ -8,12 +8,6 @@ interface Props {
defineProps<Props>()
/**
* 状态文字配色(项目详情设计稿:状态是**卡片右侧的纯文字**,不是胶囊标签)。
*
* <p>设计稿只画了「进行中」= @project-accent,其余状态按语义就近归组;
* 颜色一律走 `styles/variables.less`,组件内不写魔法色值。</p>
*/
const STATUS_CLASS: Record<ProjectStatus, string> = {
'待立项': 'is-idle',
'进行中': 'is-active',
@@ -24,7 +18,6 @@ const STATUS_CLASS: Record<ProjectStatus, string> = {
'已取消': 'is-idle',
}
/** 业务类型:优先用后端原样下发的名称(它来自提报表,接口能下发就照显),兜底才查前端枚举 */
function businessTypeText(project: Project): string {
return project.businessTypeName || formatBusinessType(project.businessType)
}
@@ -32,11 +25,6 @@ function businessTypeText(project: Project): string {
<template>
<section class="project-info-card">
<!--
项目标识:设计稿是「白底圆角方块 + 蓝色描边徽标(内含 </>)」。
⚠️ 接口没有 logo 字段(ProjectRequirementBaseVo 只下发名称/编号/类型/状态/时间),
所以这里按设计稿渲染占位徽标,不是真实项目图标。
-->
<span class="project-info-card__logo" aria-hidden="true">
<span class="project-info-card__logo-badge">&lt;/&gt;</span>
</span>
@@ -65,9 +53,6 @@ function businessTypeText(project: Project): string {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1):logo 方块 (70,196) 64×64、圆角 16;
// 标题 ink (142,212) 19/700 #1F2937;字段行 ink (142,245) 11px,标签 #6B7280 / 值 #1F2937;
// 状态 ink (1802,225.5) 16/700 #024FFF。整块 195..262(67 高),其后页签行 278 起(+16)。
.project-info-card {
.flex(row, flex-start, flex-start);
gap: 8px; // 142 − (70 + 64) = 8
@@ -84,7 +69,6 @@ function businessTypeText(project: Project): string {
background: @project-logo-bg;
}
// 方块内只有蓝色「</>」文字(设计 20/400 #024FFF)
&__logo-badge {
color: @project-accent;
font-size: 20px;
@@ -98,7 +82,6 @@ function businessTypeText(project: Project): string {
min-width: 0;
}
// 标题 19/700、行盒 25:ink 212 → box 209(块顶 195 + 14)
&__name {
margin: 14px 0 0;
font-size: 19px;
@@ -108,7 +91,6 @@ function businessTypeText(project: Project): string {
.ellipsis();
}
// 字段行 11/15:ink 245 → box 243(标题盒底 234 + 9)
&__meta {
.flex(row, flex-start, center);
gap: 20px;
@@ -130,7 +112,6 @@ function businessTypeText(project: Project): string {
font-weight: 400;
}
// 状态纯文字 16/700:ink 225.5 → box 222.5(块顶 195 + 27.5);右缘超出内容区 21.6
&__status {
flex-shrink: 0;
margin: 27.5px -21.6px 0 0;

View File

@@ -7,19 +7,12 @@ interface Props {
const props = defineProps<Props>()
/** 三态 → 修饰类(设计稿:已完成=绿实心+白勾 / 进行中=白底粗蓝环 / 待开始=白底灰环) */
function stateClass(status: Milestone['status']): string {
if (status === '已完成') return 'is-done'
if (status === '进行中') return 'is-active'
return 'is-pending'
}
/**
* 连接线是否走「已完成」的绿色。
*
* <p>设计稿实测:只有<b>下一个节点已完成</b>时该段才是绿色(第二个节点已完成 → 第 1 段绿;
* 第三个节点进行中 → 第 2 段仍是灰色,不随「进行中」变蓝)。</p>
*/
function linkDone(index: number): boolean {
return props.milestones[index + 1]?.status === '已完成'
}
@@ -49,7 +42,6 @@ function linkDone(index: number): boolean {
</svg>
</span>
<span class="project-milestones__name">{{ node.name }}</span>
<!-- 设计稿:已完成节点显示完成时间,其余显示状态文案 -->
<span class="project-milestones__sub">{{ node.time || node.status }}</span>
</li>
</ol>
@@ -61,9 +53,6 @@ function linkDone(index: number): boolean {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1;5865c6d9 −14 基准 ⇒ 统一后 +14):
// 标题 ink 471 15/700;首列中心 x261(步距 356)、已完成实心点 26(x235..261,顶 y509);
// 连接线 356×3(y520);名称 ink 541 12;说明 ink 561 10;待开始线 #E5E7EB、已完成 #22C55E。
@milestone-dot: 26px;
@milestone-line-h: 3px;
@@ -73,7 +62,7 @@ function linkDone(index: number): boolean {
&__title {
.section-title();
margin-top: 35px; // 起止时间盒底 433 → 标题盒 468
margin-top: 35px;
padding-left: 12px;
font-size: 15px;
font-weight: 700;
@@ -85,11 +74,10 @@ function linkDone(index: number): boolean {
}
}
// 起止时间盒底 433 → 「项目进度(里程碑)」盒 468(ink 471)→ 圆点顶 509
&__track {
.flex(row, flex-start, flex-start);
margin-top: 0;
padding-top: 21px; // 标题盒底 488 → 圆点顶 509
padding-top: 21px;
padding-bottom: 0;
overflow-x: auto;
.scrollbar();
@@ -101,13 +89,12 @@ function linkDone(index: number): boolean {
flex: 0 0 @milestone-node;
min-width: 0;
// 连接线:y506(圆点顶 495 起第 11px),x248 → 604(下一节点 x426 起 178 宽)
&:not(:last-child)::after {
content: '';
position: absolute;
top: (@milestone-dot / 2 - @milestone-line-h / 2); // 13 − 1.5 = 11.5
left: calc(50% + 13px); // 261 → 248 再 +13 = 当前中心 +13
width: @milestone-node; // 覆盖到下一节点左缘
left: calc(50% + 13px);
width: @milestone-node;
height: @milestone-line-h;
background: @milestone-ring;
}
@@ -128,7 +115,6 @@ function linkDone(index: number): boolean {
background: @white;
box-sizing: border-box;
// 已完成:实心绿点(设计 (235,495) 26×26,勾白 11)
.is-done & {
border-color: @milestone-done;
background: @milestone-done;
@@ -145,7 +131,6 @@ function linkDone(index: number): boolean {
height: 11px;
}
// 圆点底 521 → 名称顶 527(12px 字 line-height 16)
&__name {
margin-top: 6px;
max-width: calc(@milestone-node - 16px);
@@ -166,7 +151,6 @@ function linkDone(index: number): boolean {
}
}
// 名称底 543 → 说明顶 547(10px 字 line-height 14)
&__sub {
margin-top: 4px;
max-width: calc(@milestone-node - 16px);

View File

@@ -1,13 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
/**
* 项目中心分页器(按设计稿:小方块、当前页为**蓝色描边**而非填充)。
*
* <p>为什么不复用公共 `PaginationBar`:那个是 32px 实心选中态、服务多个页面,
* 与项目中心设计稿的 20px 描边样式不同,改它会波及其它页面。</p>
*/
interface Props {
page: number
pageSize: number
@@ -20,7 +13,6 @@ const emit = defineEmits<{ pageChange: [page: number] }>()
const pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.pageSize)))
/** 页码序列:≤7 全部展示,否则首尾 + 当前页窗口(… 省略) */
const pages = computed<Array<number | '...'>>(() => {
const n = pageCount.value
const { page } = props
@@ -96,7 +88,6 @@ function go(page: number): void {
color: @primary-color;
}
// 设计稿:当前页是描边态(蓝框 + 蓝字),不是实心
&.is-active {
border-color: @primary-color;
color: @primary-color;

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
interface Props {
/** 总体进度百分比(后端 `projectStage.developmentProgress`;未立项为 0) */
progress: number
startTime?: string
endTime?: string
@@ -8,7 +7,6 @@ interface Props {
const props = defineProps<Props>()
/** 进度条填充宽度(夹到 0~100,避免脏数据把条撑出容器) */
function clampPercent(value: number): number {
if (!Number.isFinite(value)) return 0
return Math.min(100, Math.max(0, Math.round(value)))
@@ -26,7 +24,6 @@ function clampPercent(value: number): number {
<span class="project-progress__percent">{{ clampPercent(props.progress) }}%</span>
</div>
<!-- 设计稿:轨道通栏,蓝色填充,末端一个白底蓝环圆点(进度为 0 时不画圆点) -->
<div class="project-progress__track">
<div class="project-progress__fill" :style="{ width: `${clampPercent(props.progress)}%` }" />
<span
@@ -44,18 +41,14 @@ function clampPercent(value: number): number {
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1;5865c6d9 为 −14 基准,此处统一到主流基准 ⇒ 全部 +14):
// 「开发进度」ink 324 15/700;「总体进度」ink 372 12/400 #6B7280;「65%」ink 364 20/700 #024FFF;
// 进度条 (70,402) 1780×6、填充 1157 #024FFF、轨道 #EDEFF2;起止时间 ink 420 11/400 #9CA3AF。
.project-progress {
.flex(column, flex-start, stretch);
padding: 0;
// 分割线 317 → 标题 box 321
&__title {
.section-title();
margin-top: 4px;
padding-left: 12px; // 文字落 x82 = 内容区 x70 + 12
padding-left: 12px;
font-size: 15px;
font-weight: 700;
line-height: 20px;
@@ -66,7 +59,6 @@ function clampPercent(value: number): number {
}
}
// 标题盒 321..341 → 「总体进度」盒 370(12/16)
&__head {
.flex(row, space-between, baseline);
margin-top: 29px;
@@ -78,7 +70,6 @@ function clampPercent(value: number): number {
color: @project-label;
}
// 「65%」20/700:ink 364 → 行盒 361,相对 head 行顶 370 上移 9
&__percent {
margin-top: -9px;
font-size: 20px;
@@ -87,7 +78,6 @@ function clampPercent(value: number): number {
color: @project-accent;
}
// 说明盒 370..386 → 轨道顶 402
&__track {
position: relative;
height: 6px;
@@ -103,7 +93,6 @@ function clampPercent(value: number): number {
transition: width 0.3s;
}
// 轨道底 408 → 起止时间盒 418(11/15,ink 420)
&__range {
.flex(row, space-between, center);
margin-top: 10px;

View File

@@ -3,25 +3,9 @@ import { computed } from 'vue'
import { PROJECT_STATUS_LABEL } from '@/utils/projectMeta'
import type { ProjectTypeCount, RdProjectVo } from '@/types/business/project'
/**
* 项目中心列表(按设计稿还原 + 后端 RdProjectVo 契约)。
*
* <p>设计稿要点:表头浅灰底 + 加粗居中、整表 #bbbbbb 网格线、行高约 76、
* 进度列**只给百分比文字**(不画进度条)、状态列是纯文字(不是彩色标签)、
* 最后一列是操作(「详情」,已完成的额外给「申请售后」)。</p>
*
* <p>三处「后端没有 / 前端不能编」的兜底:<br>
* 1. 业务类型列:SQL 里 `businessType` 已 JOIN 提报表**翻译成中文类型名**(如「互联网软件」),
* 直接渲染即可;`typeLabels`(提报 id → 名称)当前命不中,只作为后端改回下发 id 时的兜底。<br>
* 2. 进度列:`progress` 取项目表(未立项必为 null)⇒ 显示「—」,不假装成 0%。<br>
* 3. 状态列:取 `COALESCE(项目状态, 需求状态)`,未立项回落 `INITIATING`(待立项)。</p>
*/
interface Props {
projects: RdProjectVo[]
/** 业务类型件数列表(含「全部」);用它建 id → 中文 的映射 */
typeCounts: ProjectTypeCount[]
/** 是否处于筛选态(决定空态文案:没筛过 = 本来就没项目,筛过 = 没有符合条件的) */
filtered: boolean
}
@@ -32,7 +16,6 @@ const emit = defineEmits<{
afterSales: [id: string]
}>()
/** businessTypeId → 业务类型中文 */
const typeLabels = computed<Record<string, string>>(() => {
const map: Record<string, string> = {}
for (const item of props.typeCounts) {
@@ -48,16 +31,9 @@ function typeLabel(value: string | null | undefined): string {
function statusLabel(value: string | null | undefined): string {
if (!value) return '—'
// 后端已用字典翻成中文(「进行中」…);码值也能认,认不出就原样显示
return PROJECT_STATUS_LABEL[value] ?? value
}
/**
* 是否已完成(决定是否给「申请售后」入口)。
*
* <p>⚠️ 后端状态自字典翻译后下发的是**中文**「已完成」,码值 `COMPLETED` 也可能出现
* (字典缺项 / 直连子表)⇒ 两种都认。只比码值会让售后按钮永远不出现。</p>
*/
function isCompleted(value: string | null | undefined): boolean {
return value === 'COMPLETED' || value === '已完成'
}
@@ -135,7 +111,6 @@ function progressLabel(value: number | null | undefined): string {
border: 1px solid @project-table-line;
text-align: center;
vertical-align: middle;
// 设计稿表格正文实测 12px(比左栏正文小一号),沿用 14px 会把操作列挤到换行
font-size: @font-size-sm;
}
@@ -151,7 +126,6 @@ function progressLabel(value: number | null | undefined): string {
color: @heading-color;
}
// 列宽按设计稿实测比例(1002 总宽 → 61/294/218/107/144/90/88)
th:nth-child(1) { width: 6.09%; }
th:nth-child(2) { width: 29.34%; }
th:nth-child(3) { width: 21.76%; }

View File

@@ -33,16 +33,13 @@ defineProps<Props>()
</template>
<style lang="less" scoped>
// 设计稿实测(1920,1:1;5865c6d9 −14 基准 ⇒ 统一后 +14):
// 标题 ink 617 15/700;头像直径 64、首列左缘 x66.5(中心 98.5)、相邻中心距 99 → 间距 35;
// 姓名 ink 734 16/600 #1F2937;角色 ink 761 12/400 #9CA3AF。
.project-team {
.flex(column, flex-start, stretch);
padding: 0;
&__title {
.section-title();
margin-top: 42px; // 里程碑说明盒底 575 → 标题盒 614(ink 617)
margin-top: 42px;
padding-left: 12px;
font-size: 15px;
font-weight: 700;
@@ -54,13 +51,12 @@ defineProps<Props>()
}
}
// 标题盒底 634 → 头像顶 670(中心 y702)
&__list {
.flex(row, flex-start, flex-start);
flex-wrap: wrap;
gap: 32px @team-gap;
margin-top: 33px;
margin-left: -3.5px; // 首列左缘 66.5 = 内容区 70 − 3.5
margin-left: -3.5px;
}
&__item {
@@ -68,7 +64,6 @@ defineProps<Props>()
width: @team-size;
}
// 品牌蓝实底圆 + 白色单字(设计 16/400)
&__avatar {
.flex(row, center, center);
width: @team-size;
@@ -81,7 +76,6 @@ defineProps<Props>()
line-height: 22px;
}
// 头像底 734 → 姓名 ink 734
&__name {
margin-top: 0;
max-width: 100%;
@@ -93,7 +87,6 @@ defineProps<Props>()
.ellipsis();
}
// 姓名盒底 756 → 角色盒 759(12/19,ink 761)
&__role {
margin-top: 3px;
max-width: 100%;

View File

@@ -1,12 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
/**
* 项目中心右侧搜索条(按设计稿:关键字输入框 + 重置 + 搜索)。
*
* <p>输入框比两侧按钮更高(设计稿实测 37 vs 26),三者按中线对齐。</p>
*/
interface Props {
keyword: string
}

View File

@@ -5,7 +5,6 @@ import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { ConfirmDialog } from '@/components'
import type { FileInfo } from '@/types/api'
// 页面容器:数据只经 store,不直接 import api
import { useProjectStore } from '@/stores/modules/project'
import ProjectInfoCard from './cpns/ProjectInfoCard.vue'
import ProjectProgress from './cpns/ProjectProgress.vue'
@@ -26,7 +25,6 @@ const projectId = computed(() => String(route.params.id))
const activeTab = ref<DetailTab>('progress')
const cancelVisible = ref(false)
// 设计稿:页签是「文字 + 激活项蓝色下划线」(不是胶囊按钮组),顺序固定
const tabs: Array<{ label: string; value: DetailTab }> = [
{ label: '项目进度', value: 'progress' },
{ label: '项目文件', value: 'files' },
@@ -38,27 +36,11 @@ function load(): void {
void projectStore.fetchDetail(projectId.value)
}
/**
* 点击页签:**每次都调一次接口**,取该页签的最新数据。
*
* <p>后端详情本就是「4 个页签 4 个端点」,所以点一次 = 一次请求,且只请求被点的那一支;
* 重复点击当前页签也会重取(用于拿到别处改动后的最新值)。竞态由 store 的请求序号兜住
* ——切项目、连点同一页签都不会把旧响应盖回页面。</p>
*/
function onTabClick(tab: DetailTab): void {
activeTab.value = tab
void projectStore.refreshTab(tab)
}
/**
* 写操作的现状(2026-09-28):
* · **售后已接真实接口** —— 申请跳 `/project/:id/after-sales`(`/afterSales/request`),
* 取消走 `/afterSales/withdraw`;两者成功后都会重拉售后页签;
* · **需求附件的删除 / 预览 / 下载仍无用户端接口**(上传入口在需求提报页),
* 所以这里只提示「待接入」,**不往详情里塞本地假数据** —— 详情数据来自真实接口,
* 混入前端自造条目会让刷新前后不一致。
* 另外详情页「只展示文件」:上传入口在需求提报页,这里不提供。
*/
function onDeleteFile(index: number): void {
void index
ElMessage.info('附件删除接口待接入')
@@ -74,16 +56,6 @@ function onDownloadFile(): void {
ElMessage.info('文件下载待接口接入')
}
/**
* 「立即支付」→ 收银台。
*
* <p>带两个参数:**需求 id**(本页路由 `:id`;收银台据此调现成的
* `GET /web/requirementPool/get/finance/{需求id}` 取付款计划当订单明细)与**期次 id**
* (`vm_bill_plan.id`,用于精确指定付哪一期——本栈支付口径就是它)。</p>
*
* <p>兜底:期次 id 为空或非数字时不跳(历史兜底数据 / 后端未重启时可能出现),
* 只提示——宁可不跳,也不要把无效 id 丢给路由,让用户落在空收银台上。</p>
*/
function onPay(billId: string): void {
const id = String(billId ?? '').trim()
if (!/^\d+$/.test(id)) {
@@ -111,7 +83,6 @@ function onApplyAfterSales(): void {
}
function onConfirmCancel(): void {
// 撤回接口收的是**需求 id**(后端按需求校验归属)
void projectStore.cancelAfterSales(projectId.value)
}
@@ -135,7 +106,6 @@ onMounted(load)
<ProjectInfoCard :project="current" />
</div>
<!-- 本地 Tab 切换(设计稿:文字 + 激活项下划线) -->
<div class="project-detail__tabs">
<button
v-for="tab in tabs"
@@ -151,7 +121,6 @@ onMounted(load)
</button>
</div>
<!-- 「项目进度」页签 = 开发进度 → 里程碑 → 项目团队(顺序按设计稿) -->
<template v-if="activeTab === 'progress'">
<ProjectProgress
:progress="current.progress"
@@ -180,7 +149,6 @@ onMounted(load)
@download="onFinanceDownload"
/>
<!-- 售后页签三形态:项目未完成 / 已完成未提交 / 已完成已提交(详见组件内注释) -->
<ProjectAfterSales
v-if="activeTab === 'afterSales'"
:after-sales="current.afterSales"
@@ -206,16 +174,11 @@ onMounted(load)
</template>
<style lang="less" scoped>
// 设计稿实测(1920 画布,1:1,以 785b3eb8 / 843103b2 / ef0166c6 三张同基准稿为准):
// 面包屑 ink (70,116) 24/500 #666666;信息块 logo (70,196) 64×64、标题 ink (142,212) 19/700、
// 字段行 ink (142,245) 11px;页签行 278..318,文字 ink 278、激活蓝 #024FFF/600、常规 #4B5563/400,
// 节距 86;分割线 (70,317) 1780×1 #F0F1F3;页脚 (0,1811) 1920×481 #0C1321。
.project-detail {
.flex(column, flex-start, stretch);
gap: 0;
background: @white;
// 顶栏底 72 → 面包屑 ink 116(24px/27 行盒 → box 111.5,约 +40)
&__breadcrumb {
padding-top: 40px;
font-size: 24px;
@@ -224,15 +187,13 @@ onMounted(load)
color: @project-breadcrumb;
}
// 面包屑块 72..139 → 信息块顶 195(logo 196)
&__info {
margin-top: 56px;
}
// 信息块底 262 → 页签行顶 276..317(分割线在 317)
&__tabs {
.flex(row, flex-start, center);
gap: 16.45px; // 文字宽 69.55,节距 86 → 间距 86 − 69.55
gap: 16.45px;
height: 41px;
margin-top: 14px;
box-sizing: border-box;
@@ -241,7 +202,7 @@ onMounted(load)
&__tab {
position: relative;
padding: 0 0 24px; // 文字 box 0..17、下划线落 41
padding: 0 0 24px;
border: none;
background: transparent;
color: @project-cell;

View File

@@ -3,7 +3,6 @@
import { computed, onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useProjectStore } from '@/stores/modules/project'
import type { ProjectQuery } from '@/types/business/project'
import ProjectFilter from './cpns/ProjectFilter.vue'
@@ -15,7 +14,6 @@ const router = useRouter()
const projectStore = useProjectStore()
const { query, list, total, typeCounts } = storeToRefs(projectStore)
/** 是否处于筛选态(决定空态文案:没筛过 = 本来就没项目,筛过 = 没有符合条件的) */
const filtered = computed(() => Boolean(
query.value.keyword
|| query.value.businessTypes.length > 0
@@ -53,7 +51,6 @@ function onAfterSales(id: string): void {
void router.push(`/project/${id}/after-sales`)
}
// 进页面并发两件事:列表(/list)+ 业务类型筛选条件(/getFilterConditions,幂等只拉一次)
onMounted(() => {
void projectStore.ensureFilterConditions()
void projectStore.load()
@@ -62,7 +59,6 @@ onMounted(() => {
<template>
<div class="project">
<!-- 标题区(白底通栏,与案例库 hero 同一做法) -->
<div class="project__head">
<div class="container">
<h1 class="project__title">
@@ -135,7 +131,6 @@ onMounted(() => {
color: @text-color-secondary;
}
// 两栏:左筛选栏固定宽、右列表自适应;align 用 stretch 让两卡等高
&__body {
.flex(row, flex-start, stretch);
gap: 17px;

View File

@@ -31,11 +31,11 @@ const emit = defineEmits<{ download: [] }>()
<style lang="less" scoped>
.chat-file-card {
.flex(row, center);
gap: 8px; // 图标→文件名 11 × 0.77
min-width: 181px; // 设计 38 文件卡宽 235 × 0.77
gap: 8px;
min-width: 181px;
max-width: 320px;
padding: 10px 12px; // 卡内边距 13/15 × 0.77
border: 1px solid @project-divider; // 设计 38 卡描边 ≈ @project-divider
padding: 10px 12px;
border: 1px solid @project-divider;
border-radius: 6px;
background: @white;
@@ -52,7 +52,6 @@ const emit = defineEmits<{ download: [] }>()
min-width: 0;
}
// 设计 38:文件名 12 → 11 / 700 / #1F2937
&__name {
font-size: 11px;
font-weight: 700;
@@ -60,7 +59,6 @@ const emit = defineEmits<{ download: [] }>()
.ellipsis();
}
// 设计 38:大小 12 → 11 / #9CA3AF
&__size {
font-size: 11px;
color: @text-color-disabled;

View File

@@ -3,7 +3,6 @@ import { nextTick, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { AppButton } from '@/components'
/** 单文件大小上限 1GB */
const MAX_FILE_SIZE = 1024 * 1024 * 1024
const content = ref('')
@@ -87,19 +86,18 @@ function onFileChange(event: Event): void {
<style lang="less" scoped>
.chat-input {
.flex(column, flex-start, stretch);
gap: 16px; // 输入框→提示行 23 × 0.77
padding: 12px 16px 24px; // 上 13 / 左右 21 / 下 36 × 0.77
border-top: 1px solid @project-divider; // 设计 38 分割线 @project-divider
gap: 16px;
padding: 12px 16px 24px;
border-top: 1px solid @project-divider;
background: @white;
// 设计 38:文本域灰底无描边,占位文案 #1F2937(13 → 11)
&__textarea {
width: 100%;
height: 57px; // 文本域高 74 × 0.77(覆盖 rows 固有高)
height: 57px;
padding: 11px 10px;
border: none;
border-radius: 6px;
background: @finance-row-bg; // 设计 38 实取 @finance-row-bg
background: @finance-row-bg;
color: @heading-color;
font-size: 11px;
line-height: 1.6;
@@ -114,7 +112,7 @@ function onFileChange(event: Event): void {
}
&::placeholder {
color: @heading-color; // 设计 38 占位即标注 @heading-color
color: @heading-color;
}
}
@@ -125,7 +123,6 @@ function onFileChange(event: Event): void {
width: 100%;
}
// 设计 38:提示 11 / #9CA3AF(覆盖 text-secondary)
&__hint {
font-size: 11px;
color: @text-color-disabled;
@@ -156,7 +153,6 @@ function onFileChange(event: Event): void {
display: none;
}
// 「发送」:设计 38 #024FFF 小按钮(12 → 11 / 500)
.app-button {
height: 24px; // 31 × 0.77
padding: 0 14px;

View File

@@ -38,10 +38,9 @@ const emit = defineEmits<{ download: [] }>()
<style lang="less" scoped>
.chat-message-item {
.flex(row, flex-start, flex-start); // 头像与气泡顶对齐(设计 38)
gap: 9px; // 头像→气泡 12 × 0.77
.flex(row, flex-start, flex-start);
gap: 9px;
// 设计 38:头像直径 36 × 0.77;客服 #024FFF,用户 #8D99AE
&__avatar {
flex-shrink: 0;
.flex(row, center);
@@ -62,13 +61,12 @@ const emit = defineEmits<{ download: [] }>()
&__main {
.flex(column, flex-start, flex-start);
gap: 4px;
max-width: 320px; // 气泡最宽 ≈ 设计 410 × 0.77
max-width: 320px;
}
// 设计 38:客服气泡白底轻影;13 → 11 / #1F2937
&__bubble {
position: relative;
padding: 9px 12px; // 内边距 12/15 × 0.77
padding: 9px 12px;
border-radius: 8px;
background: @white;
box-shadow: @shadow-base;
@@ -79,20 +77,17 @@ const emit = defineEmits<{ download: [] }>()
word-break: break-word;
}
// 文件消息:文件卡自身成卡,气泡去内边距/底色/影(设计 38 单层卡)
&__bubble:has(.chat-file-card) {
padding: 0;
background: transparent;
box-shadow: none;
}
// 设计 38:消息时间 11 / #9CA3AF
&__time {
font-size: 11px;
color: @text-color-disabled;
}
// 设计 38:「未读」挂在文件卡左下外侧,10 → 11 / #9CA3AF,无底色
&__unread {
position: absolute;
top: 100%;
@@ -113,7 +108,6 @@ const emit = defineEmits<{ download: [] }>()
align-items: flex-end;
}
// 设计 38:我方气泡 #024FFF 白字
.chat-message-item__bubble {
background: @primary-strong;
color: @white;

View File

@@ -18,7 +18,6 @@ const emit = defineEmits<{
const scrollRef = ref<HTMLElement | null>(null)
/** 首条 assistant 消息标记未读 */
function isUnread(index: number): boolean {
const first = props.messages[0]
return index === 0 && first?.role === 'assistant'
@@ -72,17 +71,15 @@ watch(
box-shadow: @shadow-base;
overflow: hidden;
// 设计 38:顶栏白底,高 60 × 0.77,下缘 #F0F1F3 分割线
&__header {
.flex(row, flex-start);
gap: 11px; // 头像→文字 14 × 0.77
gap: 11px;
height: 46px;
padding: 0 16px; // 21 × 0.77
border-bottom: 1px solid @project-divider;
background: @white;
}
// 设计 38:头像直径 36 × 0.77,实取 #024FFF
&__header-avatar {
flex-shrink: 0;
width: 28px;
@@ -91,7 +88,6 @@ watch(
background: @primary-strong;
}
// 设计 38:「专属客服」14 → 11 / 700 / #1F2937
&__header-name {
align-self: center;
font-size: 11px;
@@ -101,19 +97,18 @@ watch(
&__scroll {
.flex(column, flex-start, stretch);
gap: 56px; // 消息组纵向间距(设计 38 组间 69~82 × 0.77)
gap: 56px;
max-height: 60vh;
min-height: 347px; // 消息区高 451 × 0.77
padding: 22px 16px; // 上 29 / 左右 21 × 0.77
background: @bg-color-light; // 设计 38 消息区实取 #FAFBFC
min-height: 347px;
padding: 22px 16px;
background: @bg-color-light;
overflow-y: auto;
.scrollbar();
}
// 设计 38:时间分割文字 11 / #9CA3AF,短横已含在文案内,无两侧线
&__divider {
flex-shrink: 0;
margin-bottom: -42px; // 分割线→首条 14(抵消组间距 56)
margin-bottom: -42px;
font-size: 11px;
color: @text-color-disabled;
text-align: center;

View File

@@ -2,7 +2,6 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { storeToRefs } from 'pinia'
// 页面容器:只做组件引入、props 分发、事件中转,数据只经 store
import { useServiceStore } from '@/stores/modules/service'
import ChatWindow from './cpns/ChatWindow.vue'
@@ -44,28 +43,25 @@ onMounted(() => {
<style lang="less" scoped>
.service {
.flex(column, flex-start, stretch);
gap: @spacing-base; // 头部→聊天卡 19 × 0.77
gap: @spacing-base;
max-width: @container-width;
min-height: calc(100vh - @header-height);
margin: 0 auto;
padding: 25px @spacing-base @spacing-xxl; // 标题上留白 32 × 0.77
background: @white; // 设计 38 页面底色为纯白
padding: 25px @spacing-base @spacing-xxl;
background: @white;
// 设计 38:头部文案左缩进 42 × 0.77(标题 x112 相对内容边 x70)
&__head {
padding-left: 32px;
}
// 设计 38:大标题 36 → 28 / 700 / #121212
&__title {
font-size: @font-size-xxl;
font-weight: 700;
color: @home-ink;
}
// 设计 38:副标题 24 → 18 / 500 / #666666
&__subtitle {
margin-top: 12px; // 标题→副标题 15 × 0.77
margin-top: 12px;
font-size: 18px;
font-weight: 500;
line-height: 1.5;