Commit 16f4b0fc by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents d390dcfe 4e1673a1
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<image class="home-tabbar-bg-img" <image class="home-tabbar-bg-img"
mode="aspectFill" mode="aspectFill"
src="/static/images/home/left-bg.png" /> src="/static/images/home/left-bg.png" />
<view class="hf-landscape-column">
<view class="user-box user-box-clickable hf-landscape-user" <view class="user-box user-box-clickable hf-landscape-user"
@click="emit('jumpPersonCenter')"> @click="emit('jumpPersonCenter')">
<view class="hf-landscape-profile"> <view class="hf-landscape-profile">
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
<text class="hf-landscape-name">{{ userName }}</text> <text class="hf-landscape-name">{{ userName }}</text>
</view> </view>
</view> </view>
</view>
<view class="landscape-tabbar-wrap"> <view class="landscape-tabbar-wrap">
<view class="landscape-un-tabbar landscape-vertical-tabs"> <view class="landscape-un-tabbar landscape-vertical-tabs">
<view v-for="(item, index) in tabs" <view v-for="(item, index) in tabs"
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
src="/static/images/home/setting.png" /> src="/static/images/home/setting.png" />
</view> </view>
</view> </view>
</view>
<CenterPopup :list="sceneTypeList" <CenterPopup :list="sceneTypeList"
title="选择场景" title="选择场景"
:visible="showScenePopup" :visible="showScenePopup"
...@@ -106,6 +109,20 @@ function onTabItemClick(index: number): void { ...@@ -106,6 +109,20 @@ function onTabItemClick(index: number): void {
<style scoped lang="scss"> <style scoped lang="scss">
@import "./styles/common.scss"; @import "./styles/common.scss";
/* 横屏侧栏主列:顶/左右/底对称留白,子块共一条竖直中轴 */
.hf-landscape-column {
flex: 1;
min-height: 0;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding: 14px 10px 20px;
position: relative;
z-index: 1;
}
/* 横屏侧栏:用户区 / Tab / 底按钮同一竖直中轴 */ /* 横屏侧栏:用户区 / Tab / 底按钮同一竖直中轴 */
.hf-landscape-user { .hf-landscape-user {
width: 100%; width: 100%;
...@@ -113,7 +130,8 @@ function onTabItemClick(index: number): void { ...@@ -113,7 +130,8 @@ function onTabItemClick(index: number): void {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding-top: 20px; padding-top: 0;
flex-shrink: 0;
} }
.hf-landscape-profile { .hf-landscape-profile {
...@@ -123,7 +141,7 @@ function onTabItemClick(index: number): void { ...@@ -123,7 +141,7 @@ function onTabItemClick(index: number): void {
align-items: center; align-items: center;
} }
/* 与 MyCenterMain .name 一致 */ /* 与 MyCenterMain .name 一致;与 Tab 文案同宽便于视觉对齐 */
.hf-landscape-name { .hf-landscape-name {
margin-top: 10px; margin-top: 10px;
font-size: 19px; font-size: 19px;
...@@ -131,18 +149,31 @@ function onTabItemClick(index: number): void { ...@@ -131,18 +149,31 @@ function onTabItemClick(index: number): void {
color: #1a2433; color: #1a2433;
line-height: 24px; line-height: 24px;
text-align: center; text-align: center;
max-width: 108px; width: 100%;
max-width: 104px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.hf-landscape-tab-wrap {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 0;
}
.hf-landscape-footer { .hf-landscape-footer {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
flex-shrink: 0;
margin-top: auto;
padding-bottom: 0;
} }
.hf-landscape-footer-btn { .hf-landscape-footer-btn {
...@@ -211,7 +242,8 @@ function onTabItemClick(index: number): void { ...@@ -211,7 +242,8 @@ function onTabItemClick(index: number): void {
font-size: 12px; font-size: 12px;
color: #8a98b5; color: #8a98b5;
text-align: center; text-align: center;
max-width: 96px; width: 100%;
max-width: 104px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
......
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
width: 120px; // width: 120px;
flex-shrink: 0; flex-shrink: 0;
background-image: linear-gradient(to bottom, #e8f0fe, #e8ecf5); background-image: linear-gradient(to bottom, #e8f0fe, #e8ecf5);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="funnel-container"> <view class="funnel-container">
<view class="flow-layout"> <view class="flow-layout">
<view class="funnel-main"> <view class="funnel-main">
<view class="metric-card"> <view class="metric-card metric-card-primary">
<text class="metric-label">累计交付数</text> <text class="metric-label">累计交付数</text>
<text class="metric-value">{{ funnelCountDisplay1 }}</text> <text class="metric-value">{{ funnelCountDisplay1 }}</text>
</view> </view>
...@@ -127,15 +127,18 @@ const contactRateMasked = computed((): string => { ...@@ -127,15 +127,18 @@ const contactRateMasked = computed((): string => {
.funnel-main { .funnel-main {
flex: 1; flex: 1;
min-height: 108px; min-height: 108px;
flex-direction: column; flex-direction: var(--reception-dash-flow-metric-layout-direction, column);
align-items: stretch; align-items: stretch;
justify-content: center; justify-content: center;
padding-right: 10px; padding-right: var(--reception-dash-flow-metric-to-rate-gap, 10px);
box-sizing: border-box; box-sizing: border-box;
} }
.metric-card { .metric-card {
width: 100%; width: var(--reception-dash-flow-metric-card-width, 100%);
flex-grow: var(--reception-dash-flow-metric-card-flex-grow, 0);
flex-shrink: var(--reception-dash-flow-metric-card-flex-shrink, 0);
flex-basis: var(--reception-dash-flow-metric-card-flex-basis, auto);
min-height: var(--reception-dash-flow-metric-card-min-height, 48px); min-height: var(--reception-dash-flow-metric-card-min-height, 48px);
border-radius: 12px; border-radius: 12px;
background: rgba(255, 255, 255, 0.86); background: rgba(255, 255, 255, 0.86);
...@@ -143,12 +146,16 @@ const contactRateMasked = computed((): string => { ...@@ -143,12 +146,16 @@ const contactRateMasked = computed((): string => {
padding: 8px 12px; padding: 8px 12px;
box-sizing: border-box; box-sizing: border-box;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: var(--reception-dash-flow-metric-text-align-items, flex-start);
justify-content: center; justify-content: center;
} }
.metric-card-primary {
margin-right: var(--reception-dash-flow-metric-card-primary-margin-right, 0px);
}
.metric-card-secondary { .metric-card-secondary {
margin-top: 8px; margin-top: var(--reception-dash-flow-metric-card-secondary-margin-top, 8px);
background: rgba(255, 255, 255, 0.74); background: rgba(255, 255, 255, 0.74);
box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06); box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
} }
...@@ -157,6 +164,8 @@ const contactRateMasked = computed((): string => { ...@@ -157,6 +164,8 @@ const contactRateMasked = computed((): string => {
font-size: var(--reception-dash-flow-metric-label-font-size, 11px); font-size: var(--reception-dash-flow-metric-label-font-size, 11px);
color: #7b90ad; color: #7b90ad;
line-height: var(--reception-dash-flow-metric-label-line-height, 14px); line-height: var(--reception-dash-flow-metric-label-line-height, 14px);
width: 100%;
text-align: var(--reception-dash-flow-metric-text-align, left);
} }
.metric-value { .metric-value {
...@@ -165,6 +174,8 @@ const contactRateMasked = computed((): string => { ...@@ -165,6 +174,8 @@ const contactRateMasked = computed((): string => {
font-weight: 700; font-weight: 700;
color: #1e40af; color: #1e40af;
line-height: var(--reception-dash-flow-metric-value-line-height, 22px); line-height: var(--reception-dash-flow-metric-value-line-height, 22px);
width: 100%;
text-align: var(--reception-dash-flow-metric-text-align, left);
} }
.rate-badge { .rate-badge {
......
<template> <template>
<card-container :root-style="monthCardRootStyle"> <card-container class="card-month-value">
<view class="title-box"> <view class="title-box">
<text class="title-text" :style="monthTitleTextStyle">本月业绩</text> <text class="title-text">本月业绩</text>
</view> </view>
<view class="output-summary" :style="outputSummaryStyle"> <view class="output-summary">
<!-- 左侧数值 --> <!-- 左侧数值 -->
<view class="summary-left"> <view class="summary-left">
<text class="summary-label" :style="summaryLabelTextStyle">本月预估总产值</text> <text class="summary-label">本月预估总产值</text>
<view class="summary-value-box"> <view class="summary-value-box">
<text class="summary-value-num" :style="summaryValueNumStyle">{{ summaryNumDisplay }}</text> <text class="summary-value-num">{{ summaryNumDisplay }}</text>
<text class="summary-value-unit" :style="summaryValueUnitStyle">{{ summaryUnitDisplay }}</text> <text class="summary-value-unit">{{ summaryUnitDisplay }}</text>
</view> </view>
<view class="summary-personal" :style="summaryPersonalStyle"> <view class="summary-personal">
<text class="personal-label" :style="personalLabelTextStyle">个人产值占比:</text> <text class="personal-label">个人产值占比:</text>
<text class="personal-value" :style="personalValueTextStyle">{{ personalValueDisplay }}</text> <text class="personal-value">{{ personalValueDisplay }}</text>
</view> </view>
</view> </view>
<!-- 右侧环形图 --> <!-- 右侧环形图 -->
<view class="summary-right"> <view class="summary-right">
<view class="ring-chart-wrap" :style="ringChartWrapStyle"> <view class="ring-chart-wrap">
<!-- 底部灰色环 --> <!-- 底部灰色环 -->
<view class="ring-bg" :style="ringBgStyle"></view> <view class="ring-bg"></view>
<!-- 进度半圆 --> <!-- 进度半圆 -->
<view v-if="metricsVisible" class="ring-progress-wrap" :style="ringProgressWrapStyle"> <view v-if="metricsVisible" class="ring-progress-wrap">
<view class="ring-half ring-half-left" :style="ringHalfOuterLeftStyle"> <view class="ring-half ring-half-left">
<view class="ring-half-inner" :style="ringHalfInnerLeftStyle"></view> <view class="ring-half-inner" :style="ringLeftStyle"></view>
</view> </view>
<view class="ring-half ring-half-right" :style="ringHalfOuterRightStyle"> <view class="ring-half ring-half-right">
<view class="ring-half-inner" :style="ringHalfInnerRightStyle"></view> <view class="ring-half-inner" :style="ringRightStyle"></view>
</view> </view>
</view> </view>
<!-- 中间文本 --> <!-- 中间文本 -->
<view class="ring-inner-text"> <view class="ring-inner-text">
<text class="ring-value" :style="ringValueTextStyle">{{ ringPercentDisplay }}</text> <text class="ring-value">{{ ringPercentDisplay }}</text>
<text class="ring-label" :style="ringLabelTextStyle">个人业绩占比</text> <text class="ring-label">个人业绩占比</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部指标 --> <!-- 底部指标 -->
<view class="month-target-box" :style="monthTargetBoxStyle"> <view class="month-target-box">
<view class="target-item"> <view class="target-item">
<text class="target-label" :style="targetLabelTextStyle">本月目标产值</text> <text class="target-label">本月目标产值</text>
<text class="target-value" :style="targetValueTextStyle">{{ targetValueDisplay }}</text> <text class="target-value">{{ targetValueDisplay }}</text>
</view> </view>
<view class="target-item"> <view class="target-item">
<text class="target-label" :style="targetLabelTextStyle">本月达成</text> <text class="target-label">本月达成</text>
<text class="target-value" :style="targetValueTextStyle">{{ achievementValueDisplay }}</text> <text class="target-value">{{ achievementValueDisplay }}</text>
</view> </view>
</view> </view>
</card-container> </card-container>
...@@ -61,11 +61,6 @@ ...@@ -61,11 +61,6 @@
import { computed } from 'vue' import { computed } from 'vue'
import CardContainer from './CardContainer.uvue' import CardContainer from './CardContainer.uvue'
import type { OutputSummary } from '../types/reception-output-types.uts' import type { OutputSummary } from '../types/reception-output-types.uts'
import { cssClassRef } from '@/services/adapter'
import {
getReceptionPortraitDashboardConfig,
type ReceptionPortraitDashboardConfig
} from '../styles/portrait.uts'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
...@@ -133,233 +128,27 @@ const achievementValueDisplay = computed((): string => { ...@@ -133,233 +128,27 @@ const achievementValueDisplay = computed((): string => {
}) })
// 左半圆旋转:0-50% 时旋转 P*360°,50-100% 时固定 180° // 左半圆旋转:0-50% 时旋转 P*360°,50-100% 时固定 180°
const ringLeftStyle = computed(() => { const ringLeftStyle = computed((): UTSJSONObject => {
const p = ringPercentNumForChart.value const p = ringPercentNumForChart.value
const p01 = p > 100 ? 1 : (p < 0 ? 0 : p / 100) const p01 = p > 100 ? 1 : (p < 0 ? 0 : p / 100)
const deg = p01 <= 0.5 ? p01 * 360 : 180 const deg = p01 <= 0.5 ? p01 * 360 : 180
return { transform: `rotate(${deg}deg)` } return { transform: `rotate(${deg}deg)` } as UTSJSONObject
}) })
// 右半圆旋转:>50% 时旋转 (P-0.5)*360°,形成连续弧 // 右半圆旋转:>50% 时旋转 (P-0.5)*360°,形成连续弧
const ringRightStyle = computed(() => { const ringRightStyle = computed((): UTSJSONObject => {
const p = ringPercentNumForChart.value const p = ringPercentNumForChart.value
const p01 = p > 100 ? 1 : (p < 0 ? 0 : p / 100) const p01 = p > 100 ? 1 : (p < 0 ? 0 : p / 100)
const deg = p01 > 0.5 ? (p01 - 0.5) * 360 : 0 const deg = p01 > 0.5 ? (p01 - 0.5) * 360 : 0
return { transform: `rotate(${deg}deg)` } return { transform: `rotate(${deg}deg)` } as UTSJSONObject
})
const portraitDash = computed((): ReceptionPortraitDashboardConfig | null => {
return getReceptionPortraitDashboardConfig(cssClassRef.value)
})
function monthPick(mapper: (c: ReceptionPortraitDashboardConfig) => UTSJSONObject): UTSJSONObject {
const c = portraitDash.value
if (c == null) {
return {} as UTSJSONObject
}
return mapper(c)
}
const monthCardRootStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
padding: c.dashCardPadding,
borderRadius: c.dashCardBorderRadius,
boxShadow: c.dashCardBoxShadow
} as UTSJSONObject
})
})
const monthTitleTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { fontSize: c.dashMonthTitleFontSize } as UTSJSONObject
})
})
const outputSummaryStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { marginTop: c.dashOutputSummaryMarginTop } as UTSJSONObject
})
})
const summaryLabelTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
fontSize: c.dashSummaryLabelFontSize,
marginBottom: c.dashSummaryLabelMarginBottom
} as UTSJSONObject
})
})
const summaryValueNumStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { fontSize: c.dashSummaryValueNumFontSize } as UTSJSONObject
})
})
const summaryValueUnitStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
fontSize: c.dashSummaryValueUnitFontSize,
marginLeft: c.dashSummaryValueUnitMarginLeft,
paddingBottom: c.dashSummaryValueUnitPaddingBottom
} as UTSJSONObject
})
})
const summaryPersonalStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
marginTop: c.dashSummaryPersonalMarginTop,
padding: c.dashSummaryPersonalPadding,
borderRadius: c.dashSummaryPersonalBorderRadius
} as UTSJSONObject
})
})
const personalLabelTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { fontSize: c.dashPersonalLabelFontSize } as UTSJSONObject
})
})
const personalValueTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
fontSize: c.dashPersonalValueFontSize,
marginLeft: c.dashPersonalValueMarginLeft
} as UTSJSONObject
})
})
const monthTargetBoxStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
marginTop: c.dashMonthTargetBoxMarginTop,
paddingTop: c.dashMonthTargetBoxPaddingTop
} as UTSJSONObject
})
})
const targetLabelTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { fontSize: c.dashTargetLabelFontSize } as UTSJSONObject
})
})
const targetValueTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
fontSize: c.dashTargetValueFontSize,
marginTop: c.dashTargetValueMarginTop,
fontWeight: '700'
} as UTSJSONObject
})
})
const ringChartWrapStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
width: c.dashRingChartSize,
height: c.dashRingChartSize
} as UTSJSONObject
})
})
const ringBgStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
width: c.dashRingChartSize,
height: c.dashRingChartSize,
borderRadius: c.dashRingBgBorderRadius,
borderWidth: c.dashRingBorderWidth
} as UTSJSONObject
})
})
const ringProgressWrapStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
width: c.dashRingChartSize,
height: c.dashRingChartSize
} as UTSJSONObject
})
})
const ringHalfOuterLeftStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
width: c.dashRingHalfWidth,
height: c.dashRingChartSize
} as UTSJSONObject
})
})
const ringHalfOuterRightStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
width: c.dashRingHalfWidth,
height: c.dashRingChartSize,
left: c.dashRingHalfWidth
} as UTSJSONObject
})
})
const ringHalfInnerLeftStyle = computed((): UTSJSONObject => {
const rot = ringLeftStyle.value as UTSJSONObject
const c = portraitDash.value
if (c == null) {
return rot
}
const tr = rot['transform']
const trStr = tr != null ? `${tr}` : 'rotate(0deg)'
return {
width: c.dashRingChartSize,
height: c.dashRingChartSize,
borderRadius: c.dashRingProgressInnerBorderRadius,
borderWidth: c.dashRingBorderWidth,
transformOrigin: c.dashRingTransformOrigin,
left: '0px',
transform: trStr
} as UTSJSONObject
})
const ringHalfInnerRightStyle = computed((): UTSJSONObject => {
const rot = ringRightStyle.value as UTSJSONObject
const c = portraitDash.value
if (c == null) {
return rot
}
const tr = rot['transform']
const trStr = tr != null ? `${tr}` : 'rotate(0deg)'
return {
width: c.dashRingChartSize,
height: c.dashRingChartSize,
borderRadius: c.dashRingProgressInnerBorderRadius,
borderWidth: c.dashRingBorderWidth,
transformOrigin: c.dashRingTransformOrigin,
left: c.dashRingHalfInnerLeftOffset,
transform: trStr
} as UTSJSONObject
})
const ringValueTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return { fontSize: c.dashRingValueFontSize } as UTSJSONObject
})
})
const ringLabelTextStyle = computed((): UTSJSONObject => {
return monthPick((c) => {
return {
fontSize: c.dashRingLabelFontSize,
marginTop: c.dashRingLabelMarginTop
} as UTSJSONObject
})
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.card-month-value {
margin-bottom: 16px;
}
.title-box { .title-box {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -368,15 +157,15 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -368,15 +157,15 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
.title-text { .title-text {
color: #333333; color: #333333;
font-size: 14px; font-size: var(--reception-dash-month-title-font-size);
font-weight: 600; font-weight: 700;
} }
.output-summary { .output-summary {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 24px; margin-top: var(--reception-dash-month-output-summary-margin-top);
} }
.summary-left { .summary-left {
...@@ -384,9 +173,9 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -384,9 +173,9 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.summary-label { .summary-label {
font-size: 12px; font-size: var(--reception-dash-month-summary-label-font-size);
color: #64748b; color: #64748b;
margin-bottom: 6px; margin-bottom: var(--reception-dash-month-summary-label-margin-bottom);
} }
.summary-value-box { .summary-value-box {
...@@ -396,34 +185,34 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -396,34 +185,34 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.summary-value-num { .summary-value-num {
font-size: 28px; font-size: var(--reception-dash-month-summary-num-font-size);
font-weight: bold; font-weight: bold;
color: #1677ff; color: #1677ff;
} }
.summary-value-unit { .summary-value-unit {
font-size: 14px; font-size: var(--reception-dash-month-summary-unit-font-size);
color: #1677ff; color: #1677ff;
margin-left: 2px; margin-left: var(--reception-dash-month-summary-unit-margin-left);
padding-bottom: 4px; padding-bottom: var(--reception-dash-month-summary-unit-padding-bottom);
} }
.summary-personal { .summary-personal {
flex-direction: row; flex-direction: row;
margin-top: 8px; margin-top: var(--reception-dash-month-personal-margin-top);
background-color: rgba(22, 119, 255, 0.05); background-color: rgba(22, 119, 255, 0.05);
padding: 4px 8px; padding: var(--reception-dash-month-personal-padding);
border-radius: 4px; border-radius: var(--reception-dash-month-personal-radius);
} }
.personal-label { .personal-label {
font-size: 11px; font-size: var(--reception-dash-month-personal-label-font-size);
color: #64748b; color: #64748b;
} }
.personal-value { .personal-value {
font-size: 11px; font-size: var(--reception-dash-month-personal-value-font-size);
font-weight: 600; font-weight: 700;
color: #1677ff; color: #1677ff;
margin-left: 4px; margin-left: 4px;
} }
...@@ -436,18 +225,18 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -436,18 +225,18 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
.ring-chart-wrap { .ring-chart-wrap {
position: relative; position: relative;
width: 90px; width: var(--reception-dash-month-ring-size);
height: 90px; height: var(--reception-dash-month-ring-size);
} }
.ring-bg { .ring-bg {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 90px; width: var(--reception-dash-month-ring-size);
height: 90px; height: var(--reception-dash-month-ring-size);
border-radius: 45px; border-radius: var(--reception-dash-month-ring-radius);
border-width: 6px; border-width: var(--reception-dash-month-ring-border-width);
border-style: solid; border-style: solid;
border-color: rgba(22, 119, 255, 0.08); border-color: rgba(22, 119, 255, 0.08);
box-sizing: border-box; box-sizing: border-box;
...@@ -457,15 +246,15 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -457,15 +246,15 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 90px; width: var(--reception-dash-month-ring-size);
height: 90px; height: var(--reception-dash-month-ring-size);
} }
.ring-half { .ring-half {
position: absolute; position: absolute;
top: 0; top: 0;
width: 45px; width: var(--reception-dash-month-ring-half-size);
height: 90px; height: var(--reception-dash-month-ring-size);
overflow: hidden; overflow: hidden;
} }
...@@ -474,19 +263,19 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -474,19 +263,19 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.ring-half-right { .ring-half-right {
left: 45px; left: var(--reception-dash-month-ring-half-right-left);
} }
.ring-half-inner { .ring-half-inner {
position: absolute; position: absolute;
width: 90px; width: var(--reception-dash-month-ring-size);
height: 90px; height: var(--reception-dash-month-ring-size);
border-radius: 45px; border-radius: var(--reception-dash-month-ring-radius);
border-width: 6px; border-width: var(--reception-dash-month-ring-border-width);
border-style: solid; border-style: solid;
border-color: #1677ff; border-color: #1677ff;
box-sizing: border-box; box-sizing: border-box;
transform-origin: 45px 45px; transform-origin: var(--reception-dash-month-ring-transform-origin);
} }
.ring-half-left .ring-half-inner { .ring-half-left .ring-half-inner {
...@@ -496,7 +285,7 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -496,7 +285,7 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.ring-half-right .ring-half-inner { .ring-half-right .ring-half-inner {
left: -45px; left: var(--reception-dash-month-ring-half-inner-right-left);
border-left-color: transparent; border-left-color: transparent;
border-bottom-color: transparent; border-bottom-color: transparent;
} }
...@@ -513,25 +302,21 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -513,25 +302,21 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.ring-value { .ring-value {
font-size: 16px; font-size: var(--reception-dash-month-ring-value-font-size);
font-weight: bold; font-weight: bold;
color: #1e293b; color: #1e293b;
} }
.ring-label { .ring-label {
font-size: 10px; font-size: var(--reception-dash-month-ring-label-font-size);
color: #64748b; color: #64748b;
margin-top: 2px; margin-top: var(--reception-dash-month-ring-label-margin-top);
} }
.month-target-box { .month-target-box {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
margin-top: 24px; padding-top: var(--reception-dash-month-target-padding-top);
padding-top: 16px;
border-top-width: 1px;
border-top-style: solid;
border-top-color: rgba(0, 0, 0, 0.04);
} }
.target-item { .target-item {
...@@ -539,14 +324,14 @@ const ringLabelTextStyle = computed((): UTSJSONObject => { ...@@ -539,14 +324,14 @@ const ringLabelTextStyle = computed((): UTSJSONObject => {
} }
.target-label { .target-label {
font-size: 12px; font-size: var(--reception-dash-month-target-label-font-size);
color: #64748b; color: #64748b;
} }
.target-value { .target-value {
font-size: 14px; font-size: var(--reception-dash-month-target-value-font-size);
font-weight: 600; font-weight: 700;
color: #1e293b; color: #1e293b;
margin-top: 4px; margin-top: var(--reception-dash-month-target-value-margin-top);
} }
</style> </style>
<template> <template>
<!-- 接待中心 Tab 聚合页:与 pages/index、pages/person/myCenter 一致,SceneShell 负责 hideNativeTabBar + un-tabbar --> <!-- 接待中心 Tab 聚合页:与 pages/index、pages/person/myCenter 一致,SceneShell 负责 hideNativeTabBar + un-tabbar -->
<layout-root :page-vars="pageVars"> <layout-root :page-vars="pageVars">
<view class="reception-shell-page"> <view class="reception-shell-page" :style="receptionShellPageStyle">
<SceneShell ref="shellRef" <SceneShell ref="shellRef"
:active-tab-index="1"> :active-tab-index="1">
<template #default> <template #default>
...@@ -34,8 +34,14 @@ ...@@ -34,8 +34,14 @@
<view class="reception-content-container"> <view class="reception-content-container">
<!-- 竖屏:保持原逻辑(Tabs 切换展示) --> <!-- 竖屏:保持原逻辑(Tabs 切换展示) -->
<view v-if="isLandscape != true" class="reception-content-portrait"> <view v-if="isLandscape != true" class="reception-content-portrait">
<ReceptionDashboardTab <!-- 竖屏:业绩看板内容溢出时允许上下滚动 -->
<scroll-view
v-if="mainTabIndex == 0" v-if="mainTabIndex == 0"
class="reception-dashboard-scroll"
scroll-y="true"
show-scrollbar="false"
>
<ReceptionDashboardTab
:performance-data="performanceData" :performance-data="performanceData"
:performance-metrics-visible="performanceMetricsVisible" :performance-metrics-visible="performanceMetricsVisible"
:selected-brand="selectedBrand" :selected-brand="selectedBrand"
...@@ -49,9 +55,10 @@ ...@@ -49,9 +55,10 @@
@open-brand-picker="show = true" @open-brand-picker="show = true"
@update:output-tab-index="onOutputTabIndexChange" @update:output-tab-index="onOutputTabIndexChange"
/> />
</scroll-view>
<view v-if="mainTabIndex == 1" class="reception-list-wrapper">
<ReceptionCustomerListTab <ReceptionCustomerListTab
v-if="mainTabIndex == 1"
:sticky-header="isLandscape" :sticky-header="isLandscape"
:list-sub-tab-index="listSubTabIndex" :list-sub-tab-index="listSubTabIndex"
:reception-filter-narrow-mode="receptionFilterNarrowMode" :reception-filter-narrow-mode="receptionFilterNarrowMode"
...@@ -80,6 +87,7 @@ ...@@ -80,6 +87,7 @@
@reception-click="onReceptionCardClick" @reception-click="onReceptionCardClick"
/> />
</view> </view>
</view>
<!-- 横屏:隐藏 Tabs,左右分栏同时展示(左 1/3 业绩看板,右 2/3 客户列表) --> <!-- 横屏:隐藏 Tabs,左右分栏同时展示(左 1/3 业绩看板,右 2/3 客户列表) -->
<view v-else class="reception-content-landscape"> <view v-else class="reception-content-landscape">
...@@ -215,6 +223,29 @@ const receptionOrientationHook = useOrientation() ...@@ -215,6 +223,29 @@ const receptionOrientationHook = useOrientation()
const hookOrientation = computed((): string => { const hookOrientation = computed((): string => {
return (receptionOrientationHook.orientationKey as Ref<string>).value return (receptionOrientationHook.orientationKey as Ref<string>).value
}) })
/**
* 固定页面可用高度,避免出现“整页上下滑 + 内部列表滚动”的双滚动/溢出问题。
* 说明:
* - uni-app x App 端不支持 vh/calc,改用 JS 计算后的 px 高度
* - 这里使用 useOrientation 内部的 screenHeight(物理屏幕高)作为页面容器高度基准
* - 内容区继续用 flex 布局分配剩余高度(Tabs 固定、内容自适应)
*/
const receptionShellPageStyle = computed((): UTSJSONObject => {
const h = (receptionOrientationHook.windowHeight as Ref<number>).value
if (h > 0) {
return {
width: '100%',
height: `${h}px`,
overflow: 'hidden'
} as UTSJSONObject
}
return {
width: '100%',
height: '100%',
overflow: 'hidden'
} as UTSJSONObject
})
// ========== Tab 管理 ========== // ========== Tab 管理 ==========
/** 主 Tab:0=业绩看板,1=客户列表 */ /** 主 Tab:0=业绩看板,1=客户列表 */
const mainTabIndex = ref(0) const mainTabIndex = ref(0)
...@@ -251,7 +282,9 @@ const receptionTabsContainerStyle = computed((): UTSJSONObject => { ...@@ -251,7 +282,9 @@ const receptionTabsContainerStyle = computed((): UTSJSONObject => {
return {} as UTSJSONObject return {} as UTSJSONObject
} }
return { return {
padding: c.containerPadding padding: c.containerPadding,
// 仅 768x1174 竖屏需要额外顶距,其它分辨率强制为 0(避免顶部出现多余空隙)
marginTop: '30px',
} as UTSJSONObject } as UTSJSONObject
}) })
...@@ -1209,9 +1242,7 @@ onMounted(() => { ...@@ -1209,9 +1242,7 @@ onMounted(() => {
// 横屏:左右分栏同时展示两个模块,因此初始化时两边数据都需要拉取 // 横屏:左右分栏同时展示两个模块,因此初始化时两边数据都需要拉取
if (isLandscape.value == true) { if (isLandscape.value == true) {
void getPerformanceData() void getPerformanceData()
if (listSubTabIndex.value == 0) { if (listSubTabIndex.value != 0) {
void getCustomerList(false)
} else {
void getReceptionRecordList(false) void getReceptionRecordList(false)
} }
} else { } else {
...@@ -1219,12 +1250,16 @@ onMounted(() => { ...@@ -1219,12 +1250,16 @@ onMounted(() => {
void getPerformanceData() void getPerformanceData()
} else { } else {
if (listSubTabIndex.value == 0) { if (listSubTabIndex.value == 0) {
void getCustomerList(false) // 客户列表会在下方统一触发一次
} else { } else {
void getReceptionRecordList(false) void getReceptionRecordList(false)
} }
} }
} }
// 默认页面加载完成后拉取一次客户列表
customerFilePageNum.value = 1
void getCustomerList(false)
}) })
// 在 center.uvue setup 顶部监听自定义事件,刷新列表 // 在 center.uvue setup 顶部监听自定义事件,刷新列表
...@@ -1243,6 +1278,16 @@ onUnmounted(() => { ...@@ -1243,6 +1278,16 @@ onUnmounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
@import "./styles/common.scss"; @import "./styles/common.scss";
.reception-shell-page {
flex: 1;
width: 100%;
height: 100%;
min-height: 0;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 接待中心页面包一层:供预录表单绝对定位覆盖 */ /* 接待中心页面包一层:供预录表单绝对定位覆盖 */
.reception-center-page { .reception-center-page {
flex: 1; flex: 1;
...@@ -1260,8 +1305,8 @@ onUnmounted(() => { ...@@ -1260,8 +1305,8 @@ onUnmounted(() => {
flex-shrink: 0; flex-shrink: 0;
border-bottom: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7;
padding: 0px 12px 6px; padding: 0px 12px 6px;
margin-top: 0px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 30px;
} }
.reception-main-tabs { .reception-main-tabs {
...@@ -1284,4 +1329,58 @@ onUnmounted(() => { ...@@ -1284,4 +1329,58 @@ onUnmounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
/* ========== 内容区域布局(竖/横屏) ========== */
.reception-content-container {
flex: 1;
width: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
.reception-content-portrait {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.reception-dashboard-scroll {
flex: 1;
width: 100%;
min-height: 0;
}
.reception-list-wrapper {
flex: 1;
width: 100%;
min-height: 0;
}
/* 横屏:左右分栏同时展示(左 1/3 业绩看板,右 2/3 客户列表) */
.reception-content-landscape {
flex: 1;
width: 100%;
min-height: 0;
display: flex;
flex-direction: row;
}
.reception-landscape-left {
flex: 1;
min-width: 0;
max-width: 33.3333%;
min-height: 0;
display: flex;
flex-direction: column;
}
.reception-landscape-right {
flex: 2;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
</style> </style>
...@@ -370,13 +370,6 @@ const emit = defineEmits<{ ...@@ -370,13 +370,6 @@ const emit = defineEmits<{
'close': [] 'close': []
}>() }>()
function getStr(data: UTSJSONObject | null, key: string): string {
if (data == null) { return '' }
const v = data[key]
if (v == null) { return '' }
return `${v}`
}
// 格式化手机号:13001365398 -> 130 0136 5398 // 格式化手机号:13001365398 -> 130 0136 5398
function formatPhone(phone: string): string { function formatPhone(phone: string): string {
if (phone == null || phone == '') { return '' } if (phone == null || phone == '') { return '' }
...@@ -532,7 +525,6 @@ async function loadMaterialResponsePageForDetail(d: UTSJSONObject | null): Promi ...@@ -532,7 +525,6 @@ async function loadMaterialResponsePageForDetail(d: UTSJSONObject | null): Promi
try { try {
const res = await getMaterialResponsePage(params) const res = await getMaterialResponsePage(params)
console.log('getMaterialResponsePage', res);
const body = res as UTSJSONObject const body = res as UTSJSONObject
const listRaw = body['list'] const listRaw = body['list']
if (listRaw != null && listRaw instanceof Array) { if (listRaw != null && listRaw instanceof Array) {
...@@ -573,32 +565,32 @@ watch( ...@@ -573,32 +565,32 @@ watch(
const displayName = computed((): string => { const displayName = computed((): string => {
const d = resolvedDetail.value const d = resolvedDetail.value
if (d == null) { return '-' } if (d == null) { return '-' }
const v = getStr(d, 'ownerName') const v = fieldStr(d, 'ownerName')
if (v != '') { return v } if (v != '') { return v }
return orPlaceholder(getStr(d, 'name')) return orPlaceholder(fieldStr(d, 'name'))
}) })
const displayPhone = computed((): string => { const displayPhone = computed((): string => {
const d = resolvedDetail.value const d = resolvedDetail.value
if (d == null) { return '-' } if (d == null) { return '-' }
const raw = getStr(d, 'ownerPhone') const raw = fieldStr(d, 'ownerPhone')
if (raw != '') { return formatPhone(raw) } if (raw != '') { return formatPhone(raw) }
const raw2 = getStr(d, 'phone') const raw2 = fieldStr(d, 'phone')
return orPlaceholder(formatPhone(raw2)) return orPlaceholder(formatPhone(raw2))
}) })
const displayBrandModel = computed((): string => { const displayBrandModel = computed((): string => {
const d = resolvedDetail.value const d = resolvedDetail.value
if (d == null) { return '-' } if (d == null) { return '-' }
return orPlaceholder(getStr(d, 'brandModel')) return orPlaceholder(fieldStr(d, 'brandModel'))
}) })
const displayReceptionScenario = computed((): string => { const displayReceptionScenario = computed((): string => {
const d = resolvedDetail.value const d = resolvedDetail.value
if (d == null) { return '-' } if (d == null) { return '-' }
let v = getStr(d, 'receptionScenario') let v = fieldStr(d, 'receptionScenario')
if (v == '') { if (v == '') {
v = getStr(d, 'receptionSceneName') v = fieldStr(d, 'receptionSceneName')
} }
return orPlaceholder(v) return orPlaceholder(v)
}) })
...@@ -613,9 +605,9 @@ const displayVisitDate = computed((): string => { ...@@ -613,9 +605,9 @@ const displayVisitDate = computed((): string => {
const displayCustomerTags = computed((): string => { const displayCustomerTags = computed((): string => {
const d = resolvedDetail.value const d = resolvedDetail.value
if (d == null) { return '-' } if (d == null) { return '-' }
let tag = getStr(d, 'customerTagName') let tag = fieldStr(d, 'customerTagName')
if (tag == '') { if (tag == '') {
tag = getStr(d, 'customerTags') tag = fieldStr(d, 'customerTags')
} }
if (tag.indexOf(',') >= 0) { if (tag.indexOf(',') >= 0) {
const tagParts = tag.split(',') const tagParts = tag.split(',')
......
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
<!-- 与 FormDetail 一致:固定导航 + 占位,避免首屏内容被导航栏遮挡 --> <!-- 与 FormDetail 一致:固定导航 + 占位,避免首屏内容被导航栏遮挡 -->
<un-navbar title="接待详情" @leftClick="onBack" /> <un-navbar title="接待详情" @leftClick="onBack" />
<view class="reception-navbar-spacer"></view> <view class="reception-navbar-spacer"></view>
<!-- 主内容区:可滚动 --> <!-- 主内容区:竖屏单列滚动;横屏左右分栏(左 1/3:客户卡片+质检;右 2/3:AI 导师) -->
<scroll-view class="main-scroll" scroll-y="true"> <view class="recv-detail-content-container">
<!-- 竖屏:保持原结构 -->
<scroll-view v-if="isLandscape != true" class="main-scroll" scroll-y="true">
<!-- 客户卡片 --> <!-- 客户卡片 -->
<view class="customer-card"> <view class="customer-card">
<view class="card-top"> <view class="card-top">
...@@ -152,6 +154,7 @@ ...@@ -152,6 +154,7 @@
<text class="analysis-nothing-text" :style="recvAnalysisNothingTextStyle">分析中,稍等...</text> <text class="analysis-nothing-text" :style="recvAnalysisNothingTextStyle">分析中,稍等...</text>
</view> </view>
</view> </view>
<view class="ai-section-container"> <view class="ai-section-container">
<view class="ai-title-wrap" @click="onAiAnalysis(currentDim)"> <view class="ai-title-wrap" @click="onAiAnalysis(currentDim)">
<text class="ai-title-text" :style="recvAiTitleTextStyle">AI导师</text> <text class="ai-title-text" :style="recvAiTitleTextStyle">AI导师</text>
...@@ -173,16 +176,189 @@ ...@@ -173,16 +176,189 @@
</view> </view>
<!-- <DetailData :qualityRows="qualityRows" /> --> <!-- <DetailData :qualityRows="qualityRows" /> -->
</scroll-view> </scroll-view>
<!-- 横屏:左右分栏(左 1/3:客户卡片+质检;右 2/3:AI 导师) -->
<view v-else class="recv-detail-content-landscape">
<scroll-view class="recv-detail-landscape-left" scroll-y="true">
<!-- 客户卡片 -->
<view class="customer-card">
<view class="card-top">
<view class="card-left">
<view class="name-row">
<text class="customer-name" :style="recvCustomerNameTextStyle">{{ cardCustomerName }}</text>
<text class="customer-phone" :style="recvCustomerPhoneTextStyle">{{ cardPhoneDisplay }}</text>
</view>
<view class="tag-row">
<view class="tag-item" v-if="cardTagBrand != ''">
<text class="tag-text" :style="recvTagTextStyle">{{ cardTagBrand }}</text>
</view>
<view class="tag-item" v-if="cardTagModel != ''">
<text class="tag-text" :style="recvTagTextStyle">{{ cardTagModel }}</text>
</view>
</view>
</view>
<view class="card-right">
<view class="score-wrap">
<text class="score-num" :style="recvScoreNumTextStyle">{{ cardScoreDisplay }}</text>
</view>
<view
v-if="cardShouldShowOrderFinishBadge"
:class="cardOrderFinishSuccess ? 'recv-detail-order-badge status-badge bg-green-50' : 'recv-detail-order-badge status-badge bg-red-50'"
>
<text :class="cardOrderFinishSuccess ? 'status-text text-green-400' : 'status-text text-red-400'" :style="recvStatusTextStyle">{{ cardOrderFinishResultLabel }}</text>
</view>
<text v-else-if="cardRiskFallbackDisplay != ''" class="risk-text-fallback" :style="recvRiskFallbackTextStyle">{{ cardRiskFallbackDisplay }}</text>
</view>
</view>
</view>
<view class="analysis-section-container">
<!-- 快捷操作 -->
<view class="quick-actions">
<view
class="action-btn"
:class="'action-btn-active'"
@click="onQualityReport"
>
<text class="action-text" :class="'action-text-active'" :style="recvActionTextStyle">质检</text>
</view>
<view class="quick-actions-right">
<image class="action-icon-img" @click="onShare" src="@/assets/images/reception/icon-play.png" mode="aspectFit" />
<view class="play-record-wrap" @click="onPlay">
<image class="play-icon-img" src="@/assets/images/reception/icon-share.png" mode="aspectFit" />
<text class="play-time" :style="recvPlayTimeTextStyle">{{ playTimeText }}</text>
</view>
</view>
</view>
<!-- 有质检数据:维度 Tab + 标题 + 对话/话术推荐(与音频进度联动) -->
<template v-if="qualityHasData">
<view class="analysis-tabs-wrap">
<view
class="tabs-pan"
@touchstart="onTabTouchStart"
@touchmove="onTabTouchMove"
@touchend="onTabTouchEnd"
>
<view class="tabs-row" :style="'transform: translateX(' + tabsOffset + 'px);'">
<view
class="tab-item"
v-for="(tab, idx) in qualityRows"
:key="idx"
:class="activeTab == idx ? 'tab-active' : ''"
@click="tabClick(idx)"
>
<text class="tab-text" :class="activeTab == idx ? 'tab-text-active' : ''" :style="recvTabTextStyle">{{ dimTagGroupName(tab) }}</text>
<text class="tab-value" :class="activeTab == idx ? 'tab-value-active' : ''" :style="recvTabValueTextStyle">{{ dimFormatScore(tab) }}</text>
</view>
</view>
</view>
</view>
<view class="analysis-title-wrap" v-if="currentDim != null">
<view class="analysis-title-left">
<text class="analysis-title-dot">·</text>
<text class="analysis-title-text" :style="recvAnalysisTitleTextStyle">{{ dimTagGroupName(currentDim) }}</text>
<text class="analysis-title-value" :style="recvAnalysisTitleValueTextStyle">{{ dimFormatScore(currentDim) }}</text>
</view>
<view class="analysis-match-btn" :class="dimMatchedClass(currentDim)">
<text class="analysis-match-btn-text" :style="recvMatchBtnTextStyle">{{ dimMatchedText(currentDim) }}</text>
</view>
</view>
<scroll-view
class="analysis-dialogue-scroll"
scroll-y="true"
:scroll-into-view="activeScrollId"
scroll-with-animation="true"
:style="{ height: dialogueScrollHeight }"
>
<view class="quality-block">
<template v-if="conversationBlocks.length > 0">
<template v-for="(block, bIdx) in conversationBlocks" :key="bIdx">
<view
v-if="block.kind == 'line'"
class="dialogue-item dialogue-item-selectable"
:id="dialogueRowAnchorId(block.raw, bIdx)"
:class="isDialogueRowHighlighted(block.raw, bIdx) ? 'dialogue-item-selected' : ''"
@click="seekPlay(block.raw)"
>
<view class="avatar-with-time">
<image
class="avatar"
:src="isSaleSide(block.raw) ? '/static/images/reception/icon-user-sale.png' : '/static/images/reception/icon-user-client.png'"
mode="aspectFill"
/>
<text class="bubble-time bubble-time-under-avatar" :style="recvBubbleTimeTextStyle">{{ formatLineTime(block.raw) }}</text>
</view>
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text
class="bubble-text"
:class="isDialogueRowHighlighted(block.raw, bIdx) ? 'bubble-text-selected' : ''"
:style="recvBubbleTextStyle"
>{{ lineText(block.raw) }}</text>
</view>
</view>
</view>
<view v-else class="suggestion-box">
<view class="suggestion-header">
<view class="suggestion-icon-with-time">
<image class="suggestion-icon" src="/static/images/reception/icon-pen.png" mode="aspectFit" />
<text v-if="hasLineTime(block.raw)" class="bubble-time bubble-time-under-avatar" :style="recvBubbleTimeTextStyle">{{ formatLineTime(block.raw) }}</text>
</view>
<text class="suggestion-title" :style="recvSuggestionTitleTextStyle">话术推荐</text>
</view>
<rich-text :nodes="scriptRecNodes(block.raw)"></rich-text>
</view>
</template>
</template>
<view v-else class="conversation-empty">
<CustomEmpty type="base" title="分析中,稍等..." />
</view>
</view>
</scroll-view>
</template>
<!-- 质检结果未就绪 -->
<view v-else class="analysis-nothing">
<view class="analysis-nothing-icon-wrap">
<text class="analysis-nothing-icon">◇</text>
</view>
<text class="analysis-nothing-text" :style="recvAnalysisNothingTextStyle">分析中,稍等...</text>
</view>
</view>
</scroll-view>
<view class="recv-detail-landscape-right">
<view class="ai-section-container ai-section-container-landscape">
<view class="ai-title-wrap" @click="onAiAnalysis(currentDim)">
<text class="ai-title-text" :style="recvAiTitleTextStyle">AI导师</text>
</view>
<view class="ai-window ai-window-landscape" v-if="aiUrl != ''">
<web-view
class="ai-webview ai-webview-landscape"
:src="aiUrl"
:webview-styles="{ progress: false }"
@message="handlerMessage"
@error="onAiWebviewError"
></web-view>
</view>
<template v-else>
<view class="ai-nothing ai-nothing-landscape">
<text class="ai-nothing-text" :style="recvAiNothingTextStyle">分析中,稍等...</text>
</view>
</template>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { computed, defineExpose, onMounted, onUnmounted, ref, watch } from "vue"; import { computed, defineExpose, onMounted, onUnmounted, onResize, ref, watch, type Ref } from "vue";
import { findCheckResultByBatchId, getAiagent, getShortUrl } from "@/api/receiption.uts"; import { findCheckResultByBatchId, getAiagent, getShortUrl } from "@/api/receiption.uts";
import CustomEmpty from "@/components/CustomEmpty/index.uvue"; import CustomEmpty from "@/components/CustomEmpty/index.uvue";
import DetailData from "./DetailData.uvue";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import { cssClassRef } from "@/services/adapter"; import { cssClassRef } from "@/services/adapter";
import { updateOrientation, useOrientation } from "@/services/adapter/hooks/index.uts";
import { import {
getReceptionPortraitReceptionDetailTextConfig, getReceptionPortraitReceptionDetailTextConfig,
type ReceptionPortraitReceptionDetailTextConfig, type ReceptionPortraitReceptionDetailTextConfig,
...@@ -211,6 +387,12 @@ type ConvBlock = { ...@@ -211,6 +387,12 @@ type ConvBlock = {
raw: UTSJSONObject raw: UTSJSONObject
} }
/** 横竖屏:参考 center.uvue(useOrientation 全局状态 + updateOrientation 刷新) */
const receptionOrientationHook = useOrientation();
const isLandscape = computed((): boolean => {
return (receptionOrientationHook.isPortrait as Ref<boolean>).value != true;
});
const portraitRecvDetailText = computed((): ReceptionPortraitReceptionDetailTextConfig | null => { const portraitRecvDetailText = computed((): ReceptionPortraitReceptionDetailTextConfig | null => {
return getReceptionPortraitReceptionDetailTextConfig(cssClassRef.value); return getReceptionPortraitReceptionDetailTextConfig(cssClassRef.value);
}); });
...@@ -477,10 +659,8 @@ async function loadQualityRowsByBatchId(): Promise<void> { ...@@ -477,10 +659,8 @@ async function loadQualityRowsByBatchId(): Promise<void> {
} }
const params = {} as UTSJSONObject; const params = {} as UTSJSONObject;
params["batchId"] = batchIdVal; params["batchId"] = batchIdVal;
console.log("findCheckResultByBatchId 请求参数:", params);
try { try {
const res = await findCheckResultByBatchId(params); const res = await findCheckResultByBatchId(params);
console.log("findCheckResultByBatchId 请求成功:", res);
const body = res as UTSJSONObject; const body = res as UTSJSONObject;
if (!isSuccessCode(body["code"])) { if (!isSuccessCode(body["code"])) {
qualityRows.value = []; qualityRows.value = [];
...@@ -1097,7 +1277,6 @@ function pickAiAgentItem(raw: any | null): UTSJSONObject | null { ...@@ -1097,7 +1277,6 @@ function pickAiAgentItem(raw: any | null): UTSJSONObject | null {
} }
function parseAiAgentData(res: any): UTSJSONObject | null { function parseAiAgentData(res: any): UTSJSONObject | null {
console.log("parseAiAgentDataERE", res);
if (res == null) { if (res == null) {
return null; return null;
} }
...@@ -1161,23 +1340,18 @@ async function onAiAnalysis(dim: UTSJSONObject | null): Promise<void> { ...@@ -1161,23 +1340,18 @@ async function onAiAnalysis(dim: UTSJSONObject | null): Promise<void> {
req["ownerShipType"] = 1; req["ownerShipType"] = 1;
req["accountPhone"] = accountPhone; req["accountPhone"] = accountPhone;
req["agentCode"] = "AI7"; req["agentCode"] = "AI7";
console.log("getAiagent", req);
const res = await getAiagent(req); const res = await getAiagent(req);
console.log("parseAiAgentData", res);
const data = parseAiAgentData(res); const data = parseAiAgentData(res);
console.log("parseAiAgentData2", data);
if (data == null) { if (data == null) {
uni.showToast({ title: "获取智能体失败", icon: "none" }); uni.showToast({ title: "获取智能体失败", icon: "none" });
return; return;
} }
const agentUrl = data["agentUrl"] != null ? `${data["agentUrl"]}`.trim() : ""; const agentUrl = data["agentUrl"] != null ? `${data["agentUrl"]}`.trim() : "";
console.log("parseAiAgentData3", agentUrl);
const domainName = data["domainName"] != null ? `${data["domainName"]}`.trim() : ""; const domainName = data["domainName"] != null ? `${data["domainName"]}`.trim() : "";
if (agentUrl == "" || domainName == "") { if (agentUrl == "" || domainName == "") {
uni.showToast({ title: "智能体链接异常", icon: "none" }); uni.showToast({ title: "智能体链接异常", icon: "none" });
return; return;
} }
console.log("parseAiAgentData4", domainName);
const sceneTypeRaw = parseIntValue(userInfo["sceneType"]); const sceneTypeRaw = parseIntValue(userInfo["sceneType"]);
const sceneType = sceneTypeRaw != null ? sceneTypeRaw : 0; const sceneType = sceneTypeRaw != null ? sceneTypeRaw : 0;
const businessType = sceneType == 0 ? 1 : 2; const businessType = sceneType == 0 ? 1 : 2;
...@@ -1190,10 +1364,8 @@ async function onAiAnalysis(dim: UTSJSONObject | null): Promise<void> { ...@@ -1190,10 +1364,8 @@ async function onAiAnalysis(dim: UTSJSONObject | null): Promise<void> {
const brandType = modelTypeRaw != null ? modelTypeRaw : 1001; const brandType = modelTypeRaw != null ? modelTypeRaw : 1001;
const presuppositionProblem = resolveAiPresuppositionTitle(dim); const presuppositionProblem = resolveAiPresuppositionTitle(dim);
const dateText = formatTodayYmd(); const dateText = formatTodayYmd();
console.log("dateText", dateText);
let url = `${agentUrl}?no_header=1&businessType=${businessType}&one_id=${oneId}&platformType=1&domain=${encodeURIComponent(domainName)}&presuppositionProblem=${encodeURIComponent(presuppositionProblem)}&brandType=${brandType}`; let url = `${agentUrl}?no_header=1&businessType=${businessType}&one_id=${oneId}&platformType=1&domain=${encodeURIComponent(domainName)}&presuppositionProblem=${encodeURIComponent(presuppositionProblem)}&brandType=${brandType}`;
url = `${url}&phone=${customerPhone}&brand=${encodeURIComponent(brand)}&date=${dateText}`; url = `${url}&phone=${customerPhone}&brand=${encodeURIComponent(brand)}&date=${dateText}`;
console.log("aiUrlAAAAAAA", url);
const taskStatus = data["taskStatus"]; const taskStatus = data["taskStatus"];
if (taskStatus != null) { if (taskStatus != null) {
const taskStatusText = `${taskStatus}`.trim(); const taskStatusText = `${taskStatus}`.trim();
...@@ -1435,10 +1607,15 @@ const RECEPTION_DETAIL_LAYOUT_POLL_MS = 400; ...@@ -1435,10 +1607,15 @@ const RECEPTION_DETAIL_LAYOUT_POLL_MS = 400;
let receptionDetailLayoutPollId: number | null = null; let receptionDetailLayoutPollId: number | null = null;
onMounted((): void => { onMounted((): void => {
updateOrientation();
syncReceptionSafeTopSpacer(); syncReceptionSafeTopSpacer();
receptionDetailLayoutPollId = setInterval(syncReceptionSafeTopSpacer, RECEPTION_DETAIL_LAYOUT_POLL_MS); receptionDetailLayoutPollId = setInterval(syncReceptionSafeTopSpacer, RECEPTION_DETAIL_LAYOUT_POLL_MS);
}); });
onResize((_res: any): void => {
updateOrientation();
});
onUnmounted((): void => { onUnmounted((): void => {
const ctx = localAudioCtx; const ctx = localAudioCtx;
ctx.stop(); ctx.stop();
...@@ -1462,12 +1639,37 @@ defineExpose({ ...@@ -1462,12 +1639,37 @@ defineExpose({
}); });
</script> </script>
<style> <style scoped lang="scss">
/* 遵循 uni-app x 规范:px 单位、无 gap、文字样式在 text 上、flex 布局 */ /* 遵循 uni-app x 规范:px 单位、无 gap、文字样式在 text 上、flex 布局 */
.detail-container { .detail-container,
.recv-detail-content-container,
.main-scroll,
.customer-card,
.analysis-section-container,
.quality-block,
.ai-section-container,
.ai-window {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
}
.card-top,
.name-row,
.quick-actions,
.quick-actions-right,
.score-wrap,
.status-badge,
.tabs-row,
.analysis-title-wrap,
.analysis-title-left,
.dialogue-item,
.suggestion-header {
display: flex;
flex-direction: row;
}
.detail-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 0; min-height: 0;
...@@ -1485,10 +1687,41 @@ defineExpose({ ...@@ -1485,10 +1687,41 @@ defineExpose({
flex-shrink: 0; flex-shrink: 0;
} }
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */ /* ── 主内容容器:横屏左右分栏 ───────────────────────────────────────────────── */
.main-scroll { .recv-detail-content-container {
flex: 1;
min-height: 0;
width: 100%;
overflow: hidden;
}
.recv-detail-content-landscape {
flex: 1;
min-height: 0;
display: flex;
flex-direction: row;
width: 100%;
}
.recv-detail-landscape-left {
flex: 1;
min-height: 0;
min-width: 0;
overflow: hidden;
border-right: 1px solid #eef2f7;
}
.recv-detail-landscape-right {
flex: 2;
min-height: 0;
min-width: 0;
overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
}
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */
.main-scroll {
flex: 1; flex: 1;
width: 100%; width: 100%;
min-height: 0; min-height: 0;
...@@ -1497,14 +1730,11 @@ defineExpose({ ...@@ -1497,14 +1730,11 @@ defineExpose({
/* ── 客户卡片 ───────────────────────────────────────────────────────────────── */ /* ── 客户卡片 ───────────────────────────────────────────────────────────────── */
/* 避免 width:100% + margin 导致总宽度超出:用 margin 即可,flex 子项会正确收缩 */ /* 避免 width:100% + margin 导致总宽度超出:用 margin 即可,flex 子项会正确收缩 */
.customer-card { .customer-card {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
margin: 12px 0; margin: 12px 0;
padding: 16px; padding: 16px;
opacity: 1;
border-radius: 12px; border-radius: 12px;
background-color: #ffffff; background-color: #ffffff;
background-image: linear-gradient(to bottom, #f0f6ff 0%, #ffffff 100%); background-image: linear-gradient(to bottom, #f0f6ff 0%, #ffffff 100%);
...@@ -1515,8 +1745,6 @@ defineExpose({ ...@@ -1515,8 +1745,6 @@ defineExpose({
} }
.card-top { .card-top {
display: flex;
flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
} }
...@@ -1529,8 +1757,6 @@ defineExpose({ ...@@ -1529,8 +1757,6 @@ defineExpose({
} }
.name-row { .name-row {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 8px; margin-bottom: 8px;
...@@ -1576,8 +1802,6 @@ defineExpose({ ...@@ -1576,8 +1802,6 @@ defineExpose({
} }
.score-wrap { .score-wrap {
display: flex;
flex-direction: row;
align-items: flex-end; align-items: flex-end;
} }
...@@ -1593,13 +1817,11 @@ defineExpose({ ...@@ -1593,13 +1817,11 @@ defineExpose({
} }
.status-badge { .status-badge {
display: flex;
padding-top: 2px; padding-top: 2px;
padding-bottom: 2px; padding-bottom: 2px;
padding-left: 6px; padding-left: 6px;
padding-right: 6px; padding-right: 6px;
border-radius: 4px; border-radius: 4px;
flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
...@@ -1626,15 +1848,13 @@ defineExpose({ ...@@ -1626,15 +1848,13 @@ defineExpose({
.risk-text-fallback { .risk-text-fallback {
font-size: 10px; font-size: 10px;
font-weight: 500; font-weight: 400;
color: #94a3b8; color: #94a3b8;
margin-top: 6px; margin-top: 6px;
} }
/* ── 快捷操作 ───────────────────────────────────────────────────────────────── */ /* ── 快捷操作 ───────────────────────────────────────────────────────────────── */
.quick-actions { .quick-actions {
display: flex;
flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
padding: 0 16px; padding: 0 16px;
...@@ -1642,15 +1862,11 @@ defineExpose({ ...@@ -1642,15 +1862,11 @@ defineExpose({
} }
.quick-actions-right { .quick-actions-right {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
margin-left: auto; margin-left: auto;
} }
.action-btn { .action-btn {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 96px; width: 96px;
...@@ -1672,32 +1888,6 @@ defineExpose({ ...@@ -1672,32 +1888,6 @@ defineExpose({
color: #FFFFFF; color: #FFFFFF;
} }
.action-text-inactive {
color: #2563EB;
}
.action-icon-btn {
width: 48px;
height: 40px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #EFF6FF;
border-radius: 12px;
margin-right: 8px;
margin-top: 8px;
}
.action-icon-btn:last-child {
margin-right: 0;
}
.icon-btn-text {
font-size: 16px;
color: #2563EB;
}
.action-icon-img { .action-icon-img {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -1729,15 +1919,12 @@ defineExpose({ ...@@ -1729,15 +1919,12 @@ defineExpose({
} }
.analysis-section-container { .analysis-section-container {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
margin-top: 16px; margin-top: 16px;
border-radius: 16px; border-radius: 16px;
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color: #FFFFFF; border-color: #FFFFFF;
opacity: 1;
background: #ffffff33; background: #ffffff33;
box-shadow: inset 0 0 8px 0 #ffffff; box-shadow: inset 0 0 8px 0 #ffffff;
overflow: hidden; overflow: hidden;
...@@ -1766,8 +1953,6 @@ defineExpose({ ...@@ -1766,8 +1953,6 @@ defineExpose({
} }
.tabs-row { .tabs-row {
display: flex;
flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
padding: 0 16px; padding: 0 16px;
...@@ -1822,8 +2007,6 @@ defineExpose({ ...@@ -1822,8 +2007,6 @@ defineExpose({
/* ── 分析标题栏 ─────────────────────────────────────────────────────────────── */ /* ── 分析标题栏 ─────────────────────────────────────────────────────────────── */
.analysis-title-wrap { .analysis-title-wrap {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
...@@ -1841,8 +2024,6 @@ defineExpose({ ...@@ -1841,8 +2024,6 @@ defineExpose({
} }
.analysis-title-left { .analysis-title-left {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
} }
...@@ -1867,7 +2048,6 @@ defineExpose({ ...@@ -1867,7 +2048,6 @@ defineExpose({
} }
.analysis-match-btn { .analysis-match-btn {
display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -1875,7 +2055,6 @@ defineExpose({ ...@@ -1875,7 +2055,6 @@ defineExpose({
height: 28px; height: 28px;
padding: 0 12px; padding: 0 12px;
border-radius: 14px; border-radius: 14px;
opacity: 1;
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color:#ffffff; border-color:#ffffff;
...@@ -1899,8 +2078,6 @@ defineExpose({ ...@@ -1899,8 +2078,6 @@ defineExpose({
} }
.quality-block { .quality-block {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
padding-bottom: 12px; padding-bottom: 12px;
} }
...@@ -1946,25 +2123,37 @@ defineExpose({ ...@@ -1946,25 +2123,37 @@ defineExpose({
min-height: 180px; min-height: 180px;
} }
.conversation-empty-text {
font-size: 14px;
color: #9CA3AF;
text-align: center;
}
.ai-section-container { .ai-section-container {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
margin-top: 12px; margin-top: 12px;
padding: 0 12px 12px; padding: 0 12px 12px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 16.1px; border-radius: 16.1px;
opacity: 1;
/* background:rgb(151, 193, 255); */ /* background:rgb(151, 193, 255); */
background-image: linear-gradient(to right, #e1f7fc, #f7f2ff); background-image: linear-gradient(to right, #e1f7fc, #f7f2ff);
} }
.ai-section-container-landscape {
flex: 1;
min-height: 0;
margin-top: 0px;
padding: 12px;
}
.ai-window-landscape {
flex: 1;
min-height: 0;
}
.ai-webview-landscape {
flex: 1;
height: 100%;
}
.ai-nothing-landscape {
flex: 1;
}
.ai-title-wrap { .ai-title-wrap {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -1980,14 +2169,7 @@ defineExpose({ ...@@ -1980,14 +2169,7 @@ defineExpose({
text-align: center; text-align: center;
} }
.ai-entry-text {
font-size: 12px;
color: #347BFF;
}
.ai-window { .ai-window {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
min-height: 180px; min-height: 180px;
border-radius: 12px; border-radius: 12px;
...@@ -2000,16 +2182,6 @@ defineExpose({ ...@@ -2000,16 +2182,6 @@ defineExpose({
height: 420px; height: 420px;
} }
.ai-window-title {
font-size: 14px;
font-weight: 700;
color: #111827;
padding: 12px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #F3F4F6;
}
.ai-nothing { .ai-nothing {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -2026,8 +2198,6 @@ defineExpose({ ...@@ -2026,8 +2198,6 @@ defineExpose({
} }
.dialogue-item { .dialogue-item {
display: flex;
flex-direction: row;
align-items: flex-start; align-items: flex-start;
padding: 12px 0; padding: 12px 0;
} }
...@@ -2111,17 +2281,15 @@ defineExpose({ ...@@ -2111,17 +2281,15 @@ defineExpose({
flex-direction: column; flex-direction: column;
position: relative; position: relative;
padding: 12px; padding: 12px;
border: 1px solid #e8f0ff;
background: #ffffff;
border-radius: 8px;
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color: #e8f0ff;
background: #ffffff;
border-radius: 8px;
margin: 12px; margin: 12px;
} }
.suggestion-header { .suggestion-header {
display: flex;
flex-direction: row;
align-items: flex-start; align-items: flex-start;
margin-bottom: 8px; margin-bottom: 8px;
} }
...@@ -2144,84 +2312,4 @@ defineExpose({ ...@@ -2144,84 +2312,4 @@ defineExpose({
font-weight: 700; font-weight: 700;
color: #1F2937; color: #1F2937;
} }
.suggestion-desc {
font-size: 12px;
color: #4B5563;
line-height: 1.5;
}
/* ── 底部占位 ───────────────────────────────────────────────────────────────── */
.bottom-spacer {
height: 100px;
}
/* ── 输入栏 ───────────────────────────────────────────────────────────────── */
.input-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: row;
align-items: center;
padding: 16px;
padding-bottom: 54px;
background-color: #FFFFFF;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #F3F4F6;
}
.input-wrap {
flex: 1;
min-width: 0;
display: flex;
flex-direction: row;
align-items: center;
padding: 8px 16px;
background-color: #F9FAFB;
border-radius: 16px;
border-width: 1px;
border-style: solid;
border-color: #E5E7EB;
margin-right: 12px;
}
.input-prefix,
.input-suffix {
font-size: 16px;
color: #9CA3AF;
}
.input-prefix {
margin-right: 8px;
}
.input-suffix {
margin-left: 8px;
}
.input-field {
flex: 1;
min-width: 0;
font-size: 14px;
color: #4B5563;
}
.send-btn {
width: 40px;
height: 40px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #2563EB;
border-radius: 20px;
}
.send-icon {
font-size: 18px;
color: #FFFFFF;
}
</style> </style>
...@@ -8,6 +8,38 @@ export default { ...@@ -8,6 +8,38 @@ export default {
// 兼容旧变量(scss 里有引用) // 兼容旧变量(scss 里有引用)
'--reception-main-tabs-font-size': '17px', '--reception-main-tabs-font-size': '17px',
// receptionCenter: 列表底部提示文案(加载中/已到底)默认字号(可被 resolutions 覆盖)
'--reception-list-footer-font-size': '13px',
'--reception-list-footer-line-height': '18px',
// receptionCenter: dashboard header 默认样式变量(可被 resolutions 覆盖)
'--reception-dash-header-content-padding': '16px',
'--reception-dash-header-margin-bottom': '16px',
'--reception-dash-header-surface-padding': '12px',
'--reception-dash-header-surface-border-radius': '14px',
'--reception-dash-header-top-row-margin-bottom': '10px',
'--reception-dash-header-eyebrow-font-size': '11px',
'--reception-dash-header-eyebrow-margin-bottom': '2px',
'--reception-dash-header-title-font-size': '17px',
'--reception-dash-header-eye-btn-size': '30px',
'--reception-dash-header-eye-icon-size': '18px',
'--reception-dash-header-eye-btn-margin-right': '8px',
'--reception-dash-header-tag-height': '36px',
'--reception-dash-header-tag-min-width': '148px',
'--reception-dash-header-tag-padding-x': '10px',
'--reception-dash-header-tag-border-radius': '10px',
'--reception-dash-header-badge-height': '22px',
'--reception-dash-header-badge-padding-x': '8px',
'--reception-dash-header-badge-font-size': '10px',
'--reception-dash-header-badge-margin-right': '8px',
'--reception-dash-header-tag-font-size': '13px',
'--reception-dash-header-arrow-icon-size': '14px',
'--reception-dash-header-arrow-icon-margin-left': '6px',
'--reception-dash-header-progress-row-margin-bottom': '8px',
'--reception-dash-header-progress-label-font-size': '11px',
'--reception-dash-header-progress-value-font-size': '12px',
'--reception-dash-header-progress-bar-height': '8px',
// receptionCenter: dashboard(CardOutputValue) 默认样式变量(可被 resolutions 覆盖) // receptionCenter: dashboard(CardOutputValue) 默认样式变量(可被 resolutions 覆盖)
'--reception-dash-card-padding': '16px 20px', '--reception-dash-card-padding': '16px 20px',
'--reception-dash-card-border-radius': '22px', '--reception-dash-card-border-radius': '22px',
...@@ -29,6 +61,18 @@ export default { ...@@ -29,6 +61,18 @@ export default {
'--reception-dash-flow-metric-label-font-size': '11px', '--reception-dash-flow-metric-label-font-size': '11px',
'--reception-dash-flow-metric-value-font-size': '19px', '--reception-dash-flow-metric-value-font-size': '19px',
'--reception-dash-flow-metric-card-min-height': '48px', '--reception-dash-flow-metric-card-min-height': '48px',
// receptionCenter: dashboard(CardFlow) 卡片布局变量(可被 resolutions 覆盖)
'--reception-dash-flow-metric-layout-direction': 'column',
'--reception-dash-flow-metric-to-rate-gap': '10px',
'--reception-dash-flow-metric-card-width': '100%',
'--reception-dash-flow-metric-card-flex-grow': '0',
'--reception-dash-flow-metric-card-flex-shrink': '0',
'--reception-dash-flow-metric-card-flex-basis': 'auto',
// receptionCenter: dashboard(CardFlow) 文本对齐(可被 resolutions 覆盖)
'--reception-dash-flow-metric-text-align-items': 'flex-start',
'--reception-dash-flow-metric-text-align': 'left',
'--reception-dash-flow-metric-card-primary-margin-right': '0px',
'--reception-dash-flow-metric-card-secondary-margin-top': '8px',
'--reception-dash-flow-metric-label-line-height': '14px', '--reception-dash-flow-metric-label-line-height': '14px',
'--reception-dash-flow-metric-value-line-height': '22px', '--reception-dash-flow-metric-value-line-height': '22px',
'--reception-dash-flow-rate-caption-font-size': '11px', '--reception-dash-flow-rate-caption-font-size': '11px',
...@@ -37,6 +81,40 @@ export default { ...@@ -37,6 +81,40 @@ export default {
'--reception-dash-flow-rate-value-line-height': '22px', '--reception-dash-flow-rate-value-line-height': '22px',
'--reception-dash-flow-rate-badge-size': '94px', '--reception-dash-flow-rate-badge-size': '94px',
'--reception-dash-flow-rate-badge-radius': '47px', '--reception-dash-flow-rate-badge-radius': '47px',
// receptionCenter: dashboard(CardMonthValue) 默认样式变量(可被 resolutions 覆盖)
'--reception-dash-month-title-font-size': '14px',
'--reception-dash-month-output-summary-margin-top': '18px',
'--reception-dash-month-summary-label-font-size': '12px',
'--reception-dash-month-summary-label-margin-bottom': '6px',
'--reception-dash-month-summary-num-font-size': '28px',
'--reception-dash-month-summary-unit-font-size': '14px',
'--reception-dash-month-summary-unit-margin-left': '2px',
'--reception-dash-month-summary-unit-padding-bottom': '4px',
'--reception-dash-month-personal-margin-top': '8px',
'--reception-dash-month-personal-padding': '4px 8px',
'--reception-dash-month-personal-radius': '4px',
'--reception-dash-month-personal-label-font-size': '11px',
'--reception-dash-month-personal-value-font-size': '11px',
'--reception-dash-month-ring-size': '90px',
'--reception-dash-month-ring-half-size': '45px',
'--reception-dash-month-ring-radius': '45px',
'--reception-dash-month-ring-border-width': '6px',
'--reception-dash-month-ring-transform-origin': '45px 45px',
'--reception-dash-month-ring-half-right-left': '45px',
'--reception-dash-month-ring-half-inner-right-left': '-45px',
'--reception-dash-month-ring-value-font-size': '16px',
'--reception-dash-month-ring-label-font-size': '10px',
'--reception-dash-month-ring-label-margin-top': '2px',
'--reception-dash-month-target-padding-top': '16px',
'--reception-dash-month-target-label-font-size': '12px',
'--reception-dash-month-target-value-font-size': '14px',
'--reception-dash-month-target-value-margin-top': '4px',
}, },
portrait: { portrait: {
'--adapter-color': 'red', '--adapter-color': 'red',
...@@ -68,6 +146,38 @@ export default { ...@@ -68,6 +146,38 @@ export default {
// 兼容旧变量(scss 里有引用) // 兼容旧变量(scss 里有引用)
'--reception-main-tabs-font-size': '24px', '--reception-main-tabs-font-size': '24px',
// 针对 768x1174 竖屏:列表底部提示文案字号自适应增大
'--reception-list-footer-font-size': '16px',
'--reception-list-footer-line-height': '22px',
// 针对 768x1174 竖屏:看板头部(header) 尺寸自适应增大
'--reception-dash-header-content-padding': '22px',
'--reception-dash-header-margin-bottom': '22px',
'--reception-dash-header-surface-padding': '18px',
'--reception-dash-header-surface-border-radius': '18px',
'--reception-dash-header-top-row-margin-bottom': '14px',
'--reception-dash-header-eyebrow-font-size': '16px',
'--reception-dash-header-eyebrow-margin-bottom': '4px',
'--reception-dash-header-title-font-size': '24px',
'--reception-dash-header-eye-btn-size': '44px',
'--reception-dash-header-eye-icon-size': '26px',
'--reception-dash-header-eye-btn-margin-right': '12px',
'--reception-dash-header-tag-height': '52px',
'--reception-dash-header-tag-min-width': '220px',
'--reception-dash-header-tag-padding-x': '14px',
'--reception-dash-header-tag-border-radius': '14px',
'--reception-dash-header-badge-height': '32px',
'--reception-dash-header-badge-padding-x': '10px',
'--reception-dash-header-badge-font-size': '15px',
'--reception-dash-header-badge-margin-right': '12px',
'--reception-dash-header-tag-font-size': '19px',
'--reception-dash-header-arrow-icon-size': '20px',
'--reception-dash-header-arrow-icon-margin-left': '10px',
'--reception-dash-header-progress-row-margin-bottom': '12px',
'--reception-dash-header-progress-label-font-size': '16px',
'--reception-dash-header-progress-value-font-size': '17px',
'--reception-dash-header-progress-bar-height': '12px',
// 针对 768x1174 竖屏:看板(CardOutputValue) 字体/宽高自适应增大 // 针对 768x1174 竖屏:看板(CardOutputValue) 字体/宽高自适应增大
'--reception-dash-output-tabs-margin-bottom': '28px', '--reception-dash-output-tabs-margin-bottom': '28px',
'--reception-dash-segmented-font-size': '19px', '--reception-dash-segmented-font-size': '19px',
...@@ -86,14 +196,61 @@ export default { ...@@ -86,14 +196,61 @@ export default {
'--reception-dash-flow-metric-label-font-size': '16px', '--reception-dash-flow-metric-label-font-size': '16px',
'--reception-dash-flow-metric-value-font-size': '28px', '--reception-dash-flow-metric-value-font-size': '28px',
'--reception-dash-flow-metric-card-min-height': '72px', '--reception-dash-flow-metric-card-min-height': '72px',
// 针对 768x1174 竖屏:两个 metric card 并排展示
'--reception-dash-flow-metric-layout-direction': 'row',
'--reception-dash-flow-metric-to-rate-gap': '16px',
'--reception-dash-flow-metric-card-width': 'auto',
'--reception-dash-flow-metric-card-flex-grow': '1',
'--reception-dash-flow-metric-card-flex-shrink': '1',
'--reception-dash-flow-metric-card-flex-basis': '0px',
// 针对 768x1174 竖屏:卡片内文字居中
'--reception-dash-flow-metric-text-align-items': 'center',
'--reception-dash-flow-metric-text-align': 'center',
'--reception-dash-flow-metric-card-primary-margin-right': '12px',
'--reception-dash-flow-metric-card-secondary-margin-top': '0px',
'--reception-dash-flow-metric-label-line-height': '20px', '--reception-dash-flow-metric-label-line-height': '20px',
'--reception-dash-flow-metric-value-line-height': '34px', '--reception-dash-flow-metric-value-line-height': '34px',
'--reception-dash-flow-rate-caption-font-size': '16px', '--reception-dash-flow-rate-caption-font-size': '16px',
'--reception-dash-flow-rate-caption-line-height': '20px', '--reception-dash-flow-rate-caption-line-height': '20px',
'--reception-dash-flow-rate-value-font-size': '26px', '--reception-dash-flow-rate-value-font-size': '26px',
'--reception-dash-flow-rate-value-line-height': '32px', '--reception-dash-flow-rate-value-line-height': '32px',
'--reception-dash-flow-rate-badge-size': '140px', '--reception-dash-flow-rate-badge-size': '120px',
'--reception-dash-flow-rate-badge-radius': '70px', '--reception-dash-flow-rate-badge-radius': '60px',
// 针对 768x1174 竖屏:本月业绩卡片(CardMonthValue) 字体/尺寸自适应增大
'--reception-dash-month-title-font-size': '20px',
'--reception-dash-month-output-summary-margin-top': '22px',
'--reception-dash-month-summary-label-font-size': '16px',
'--reception-dash-month-summary-label-margin-bottom': '10px',
'--reception-dash-month-summary-num-font-size': '40px',
'--reception-dash-month-summary-unit-font-size': '20px',
'--reception-dash-month-summary-unit-margin-left': '6px',
'--reception-dash-month-summary-unit-padding-bottom': '6px',
'--reception-dash-month-personal-margin-top': '14px',
'--reception-dash-month-personal-padding': '8px 12px',
'--reception-dash-month-personal-radius': '10px',
'--reception-dash-month-personal-label-font-size': '16px',
'--reception-dash-month-personal-value-font-size': '16px',
'--reception-dash-month-ring-size': '128px',
'--reception-dash-month-ring-half-size': '64px',
'--reception-dash-month-ring-radius': '64px',
'--reception-dash-month-ring-border-width': '8px',
'--reception-dash-month-ring-transform-origin': '64px 64px',
'--reception-dash-month-ring-half-right-left': '64px',
'--reception-dash-month-ring-half-inner-right-left': '-64px',
'--reception-dash-month-ring-value-font-size': '22px',
'--reception-dash-month-ring-label-font-size': '14px',
'--reception-dash-month-ring-label-margin-top': '6px',
'--reception-dash-month-target-margin-top': '32px',
'--reception-dash-month-target-padding-top': '22px',
'--reception-dash-month-target-label-font-size': '16px',
'--reception-dash-month-target-value-font-size': '20px',
'--reception-dash-month-target-value-margin-top': '8px',
}, },
'landscape-1174x768': { 'landscape-1174x768': {
'--adapter-color': '#FF4444', '--adapter-color': '#FF4444',
......
...@@ -138,6 +138,9 @@ ...@@ -138,6 +138,9 @@
<text v-if="receptionListLoadingMore == true" class="list-footer-text">加载中...</text> <text v-if="receptionListLoadingMore == true" class="list-footer-text">加载中...</text>
<text v-else-if="receptionListHasMore != true && receptionRecordList.length > 0" class="list-footer-text">- 已经到底了 -</text> <text v-else-if="receptionListHasMore != true && receptionRecordList.length > 0" class="list-footer-text">- 已经到底了 -</text>
</view> </view>
<!-- 竖屏:底部增加 tabbar 占位 + 安全区 padding,避免内容被自定义 tabbar 覆盖 -->
<view v-if="isPortraitMode == true" class="list-bottom-safe-spacer" :style="bottomSafeSpacerStyle"></view>
</view> </view>
</list-item> </list-item>
</list-view> </list-view>
...@@ -153,6 +156,7 @@ import CustomEmpty from '@/components/CustomEmpty/index.uvue' ...@@ -153,6 +156,7 @@ import CustomEmpty from '@/components/CustomEmpty/index.uvue'
import ReceptionListPrimaryFilter from '../filters/ReceptionListPrimaryFilter.uvue' import ReceptionListPrimaryFilter from '../filters/ReceptionListPrimaryFilter.uvue'
import ReceptionListSecondaryFilter from '../filters/ReceptionListSecondaryFilter.uvue' import ReceptionListSecondaryFilter from '../filters/ReceptionListSecondaryFilter.uvue'
import { cssClassRef } from '@/services/adapter' import { cssClassRef } from '@/services/adapter'
import { getPortraitConfig, PORTRAIT_COMMON } from '@/components/HomeFrame/styles/portrait.uts'
import { import {
getReceptionPortraitListSubTabsConfig, getReceptionPortraitListSubTabsConfig,
type ReceptionPortraitListSubTabsConfig, type ReceptionPortraitListSubTabsConfig,
...@@ -219,6 +223,21 @@ const showCustomerEmpty = computed((): boolean => { ...@@ -219,6 +223,21 @@ const showCustomerEmpty = computed((): boolean => {
const showReceptionEmpty = computed((): boolean => { const showReceptionEmpty = computed((): boolean => {
return props.receptionRecordList.length == 0 && props.receptionListHasMore != true && props.receptionListLoadingMore != true return props.receptionRecordList.length == 0 && props.receptionListHasMore != true && props.receptionListLoadingMore != true
}) })
const isPortraitMode = computed((): boolean => {
const cls = cssClassRef.value
return cls != null && cls.indexOf('layout-portrait') >= 0
})
const bottomSafeSpacerStyle = computed((): UTSJSONObject => {
if (isPortraitMode.value != true) {
return {} as UTSJSONObject
}
const cls = cssClassRef.value
const cfg = getPortraitConfig(cls)
const h = cfg != null ? (cfg.tabbarHeight as number) : (PORTRAIT_COMMON.tabbarHeight as number)
return { height: `${h}px` } as UTSJSONObject
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -364,6 +383,7 @@ const showReceptionEmpty = computed((): boolean => { ...@@ -364,6 +383,7 @@ const showReceptionEmpty = computed((): boolean => {
flex-direction: column; flex-direction: column;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -380,8 +400,13 @@ const showReceptionEmpty = computed((): boolean => { ...@@ -380,8 +400,13 @@ const showReceptionEmpty = computed((): boolean => {
flex-direction: row; flex-direction: row;
} }
.list-bottom-safe-spacer {
width: 100%;
}
.list-footer-text { .list-footer-text {
font-size: 10px; font-size: var(--reception-list-footer-font-size, 13px);
line-height: var(--reception-list-footer-line-height, 18px);
color: #94A3B8; color: #94A3B8;
} }
</style> </style>
<template> <template>
<layout-root :page-vars="pageVars"> <!-- <layout-root :page-vars="pageVars"> -->
<!-- <scroll-view class="dashboard-scroll-view" :scroll-y="true" :show-scrollbar="false"> --> <!-- <scroll-view class="dashboard-scroll-view" :scroll-y="true" :show-scrollbar="false"> -->
<!-- <view class="test test-view"> <!-- <view class="test test-view">
<text class="test-orientation-text">hooks</text> <text class="test-orientation-text">hooks</text>
</view> --> </view> -->
<view class="dashboard-content" :style="dashboardContentStyle"> <view class="dashboard-content">
<view class="card-header" :style="dashboardCardHeaderStyle"> <view class="card-header">
<view class="header-surface" :style="dashboardHeaderSurfaceStyle"> <view class="header-surface">
<view class="header-top-row" :style="dashboardHeaderTopRowStyle"> <view class="header-top-row">
<view class="header-title-group"> <view class="header-title-group">
<text class="header-eyebrow" :style="dashboardEyebrowTextStyle">数据概览</text> <text class="header-eyebrow">数据概览</text>
<text class="header-title" :style="dashboardTitleTextStyle">业绩看板</text> <text class="header-title">业绩看板</text>
</view> </view>
<view class="header-control-pack"> <view class="header-control-pack">
<view class="header-eye-btn" :style="dashboardEyeBtnStyle" @click="emit('toggleMetrics')"> <view class="header-eye-btn" @click="emit('toggleMetrics')">
<un-icon v-if="performanceMetricsVisible" name="eye" color="#334155" :size="dashboardHeaderIconSize"></un-icon> <un-icon v-if="performanceMetricsVisible" name="eye" color="#334155" :size="headerEyeIconSize"></un-icon>
<un-icon v-if="performanceMetricsVisible == false" name="eye-off" color="#1677ff" :size="dashboardHeaderIconSize"></un-icon> <un-icon v-if="performanceMetricsVisible == false" name="eye-off" color="#1677ff" :size="headerEyeIconSize"></un-icon>
</view> </view>
<view class="tag-box" :style="dashboardTagBoxStyle" @click="emit('openBrandPicker')"> <view class="tag-box" @click="emit('openBrandPicker')">
<view class="module-badge" :style="dashboardModuleBadgeStyle"> <view class="module-badge">
<text class="module-badge-text" :style="dashboardModuleBadgeTextStyle">模块</text> <text class="module-badge-text">模块</text>
</view> </view>
<text class="tag-text" :style="dashboardTagTextStyle">{{ selectedBrand }}</text> <text class="tag-text">{{ selectedBrand }}</text>
<image <image
class="tag-arrow-icon" class="tag-arrow-icon"
:style="dashboardTagArrowStyle"
src="/static/images/reception/icon-select-arrow.png" src="/static/images/reception/icon-select-arrow.png"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
</view> </view>
</view> </view>
<view class="progress-meta-row" :style="dashboardProgressMetaRowStyle"> <view class="progress-meta-row">
<text class="progress-label-text" :style="dashboardProgressLabelStyle">时间进度</text> <text class="progress-label-text">时间进度</text>
<text class="progress-value-text" :style="dashboardProgressValueStyle">{{ performanceMetricsVisible ? (timeProgressPercent + '%') : '**' }}</text> <text class="progress-value-text">{{ performanceMetricsVisible ? (timeProgressPercent + '%') : '**' }}</text>
</view> </view>
<view class="progress-bar-bg" :style="dashboardProgressBarBgStyle"> <view class="progress-bar-bg">
<view class="progress-bar-fill" :style="{ width: progressWidth }"></view> <view class="progress-bar-fill" :style="{ width: progressWidth }"></view>
</view> </view>
</view> </view>
...@@ -47,16 +46,17 @@ ...@@ -47,16 +46,17 @@
:metrics-visible="performanceMetricsVisible" :metrics-visible="performanceMetricsVisible"
@update:tab-index="onUpdateOutputTabIndex" @update:tab-index="onUpdateOutputTabIndex"
/> />
<view class="card-month-value-wrap">
<CardMonthValue <CardMonthValue
:style="dashboardCardMonthStyle"
:summary="summary" :summary="summary"
:target-value-text="targetValueText" :target-value-text="targetValueText"
:achievement-value-text="achievementValueText" :achievement-value-text="achievementValueText"
:metrics-visible="performanceMetricsVisible" :metrics-visible="performanceMetricsVisible"
/> />
</view> </view>
</view>
<!-- </scroll-view> --> <!-- </scroll-view> -->
</layout-root> <!-- </layout-root> -->
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -65,13 +65,7 @@ import CardFlow from '../cards/CardFlow.uvue' ...@@ -65,13 +65,7 @@ import CardFlow from '../cards/CardFlow.uvue'
import CardOutputValue from '../cards/CardOutputValue.uvue' import CardOutputValue from '../cards/CardOutputValue.uvue'
import CardMonthValue from '../cards/CardMonthValue.uvue' import CardMonthValue from '../cards/CardMonthValue.uvue'
import type { CompareRow, OutputSummary } from '../types/reception-output-types.uts' import type { CompareRow, OutputSummary } from '../types/reception-output-types.uts'
import { cssClassRef } from "@/services/adapter"; // import pageVars from '../styles/index.vars'
import pageVars from '../styles/index.vars'
// 导入样式变量
import {
getReceptionPortraitDashboardConfig,
type ReceptionPortraitDashboardConfig
} from "../styles/portrait.uts";
const props = defineProps<{ const props = defineProps<{
performanceData: UTSJSONObject performanceData: UTSJSONObject
...@@ -94,152 +88,6 @@ const emit = defineEmits<{ ...@@ -94,152 +88,6 @@ const emit = defineEmits<{
function onUpdateOutputTabIndex(index: number): void { function onUpdateOutputTabIndex(index: number): void {
emit('update:outputTabIndex', index) emit('update:outputTabIndex', index)
} }
/** 768x1174 竖屏看板专用配置;其它分辨率返回 null,保持 scss 默认 */
const portraitDashboardCfg = computed((): ReceptionPortraitDashboardConfig | null => {
return getReceptionPortraitDashboardConfig(cssClassRef.value)
})
function dashStyle(mapper: (c: ReceptionPortraitDashboardConfig) => UTSJSONObject): UTSJSONObject {
const c = portraitDashboardCfg.value
if (c == null) {
return {} as UTSJSONObject
}
return mapper(c)
}
const dashboardContentStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { padding: c.contentPadding } as UTSJSONObject
})
})
const dashboardCardHeaderStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { marginBottom: c.cardHeaderMarginBottom } as UTSJSONObject
})
})
const dashboardHeaderSurfaceStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return {
padding: c.surfacePadding,
borderRadius: c.surfaceBorderRadius,
boxShadow: c.surfaceBoxShadow
} as UTSJSONObject
})
})
const dashboardHeaderTopRowStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { marginBottom: c.headerTopRowMarginBottom } as UTSJSONObject
})
})
const dashboardEyebrowTextStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.eyebrowFontSize } as UTSJSONObject
})
})
const dashboardTitleTextStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.titleFontSize } as UTSJSONObject
})
})
const dashboardHeaderIconSize = computed((): number => {
const c = portraitDashboardCfg.value
return c != null ? c.headerIconSize : 18
})
const dashboardEyeBtnStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return {
width: c.eyeBtnWidth,
height: c.eyeBtnHeight,
marginRight: c.eyeBtnMarginRight,
borderRadius: c.eyeBtnBorderRadius
} as UTSJSONObject
})
})
const dashboardTagBoxStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return {
height: c.tagBoxHeight,
minWidth: c.tagBoxMinWidth,
padding: c.tagBoxPadding,
borderRadius: c.tagBoxBorderRadius,
boxShadow: c.tagBoxBoxShadow
} as UTSJSONObject
})
})
const dashboardModuleBadgeStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return {
height: c.moduleBadgeHeight,
paddingLeft: c.moduleBadgePaddingLeft,
paddingRight: c.moduleBadgePaddingRight,
marginRight: c.moduleBadgeMarginRight,
borderRadius: c.moduleBadgeBorderRadius
} as UTSJSONObject
})
})
const dashboardModuleBadgeTextStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.moduleBadgeTextFontSize } as UTSJSONObject
})
})
const dashboardTagTextStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.tagTextFontSize } as UTSJSONObject
})
})
const dashboardTagArrowStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return {
width: c.tagArrowWidth,
height: c.tagArrowHeight,
marginLeft: c.tagArrowMarginLeft
} as UTSJSONObject
})
})
const dashboardProgressMetaRowStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { marginBottom: c.progressMetaMarginBottom } as UTSJSONObject
})
})
const dashboardProgressLabelStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.progressLabelFontSize } as UTSJSONObject
})
})
const dashboardProgressValueStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { fontSize: c.progressValueFontSize } as UTSJSONObject
})
})
const dashboardProgressBarBgStyle = computed((): UTSJSONObject => {
return dashStyle((c) => {
return { height: c.progressBarHeight } as UTSJSONObject
})
})
const dashboardCardMonthStyle = computed((): UTSJSONObject => {
const c = portraitDashboardCfg.value
if (c == null) {
return { marginTop: '10px' } as UTSJSONObject
}
return { marginTop: c.cardMonthValueMarginTop } as UTSJSONObject
})
const progressWidth = computed((): string => { const progressWidth = computed((): string => {
const raw = props.timeProgressPercent const raw = props.timeProgressPercent
const pct = (typeof raw == 'number' && isNaN(raw) != true) ? raw : 0 const pct = (typeof raw == 'number' && isNaN(raw) != true) ? raw : 0
...@@ -247,10 +95,28 @@ const progressWidth = computed((): string => { ...@@ -247,10 +95,28 @@ const progressWidth = computed((): string => {
const displayW = w > 0 && w < 4 ? 4 : w const displayW = w > 0 && w < 4 ? 4 : w
return `${displayW}%` return `${displayW}%`
}) })
const headerEyeIconSize = computed((): number => {
// 与 index.vars.uts 的 portrait-768x1174 保持一致:该分辨率下 icon 需要同步放大
try {
const info = uni.getSystemInfoSync()
const w = info.screenWidth
const h = info.screenHeight
if ((w == 768 && h == 1174) || (w == 1174 && h == 768)) {
return 26
}
} catch (e) {
// ignore
}
return 18
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "../styles/common.scss"; .card-month-value-wrap {
margin: 16px 0;
}
// @import "../styles/common.scss";
.dashboard-scroll-view { .dashboard-scroll-view {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
...@@ -260,18 +126,18 @@ const progressWidth = computed((): string => { ...@@ -260,18 +126,18 @@ const progressWidth = computed((): string => {
} }
.dashboard-content { .dashboard-content {
padding: 16px; padding: var(--reception-dash-header-content-padding, 16px);
} }
.card-header { .card-header {
margin-bottom: 16px; margin-bottom: var(--reception-dash-header-margin-bottom, 16px);
} }
.header-surface { .header-surface {
background-color: #ffffff; background-color: #ffffff;
border: 1px solid #e6edf6; border: 1px solid #e6edf6;
border-radius: 14px; border-radius: var(--reception-dash-header-surface-border-radius, 14px);
padding: 12px; padding: var(--reception-dash-header-surface-padding, 12px);
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
flex-direction: column; flex-direction: column;
} }
...@@ -280,7 +146,7 @@ const progressWidth = computed((): string => { ...@@ -280,7 +146,7 @@ const progressWidth = computed((): string => {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: var(--reception-dash-header-top-row-margin-bottom, 10px);
} }
.header-title-group { .header-title-group {
...@@ -293,35 +159,35 @@ const progressWidth = computed((): string => { ...@@ -293,35 +159,35 @@ const progressWidth = computed((): string => {
} }
.header-eyebrow { .header-eyebrow {
font-size: 11px; font-size: var(--reception-dash-header-eyebrow-font-size, 11px);
color: #94a3b8; color: #94a3b8;
margin-bottom: 2px; margin-bottom: var(--reception-dash-header-eyebrow-margin-bottom, 2px);
} }
.header-eye-btn { .header-eye-btn {
width: 30px; width: var(--reception-dash-header-eye-btn-size, 30px);
height: 30px; height: var(--reception-dash-header-eye-btn-size, 30px);
border-radius: 999px; border-radius: 999px;
border: 1px solid #dbe7f5; border: 1px solid #dbe7f5;
background-color: #f8fbff; background-color: #f8fbff;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-right: 8px; margin-right: var(--reception-dash-header-eye-btn-margin-right, 8px);
} }
.header-title { .header-title {
font-size: 17px; font-size: var(--reception-dash-header-title-font-size, 17px);
font-weight: 700; font-weight: 700;
color: #1E293B; color: #1E293B;
} }
.tag-box { .tag-box {
height: 36px; height: var(--reception-dash-header-tag-height, 36px);
min-width: 148px; min-width: var(--reception-dash-header-tag-min-width, 148px);
background-color: #f5f9ff; background-color: #f5f9ff;
padding: 0 10px; padding: 0 var(--reception-dash-header-tag-padding-x, 10px);
border-radius: 10px; border-radius: var(--reception-dash-header-tag-border-radius, 10px);
border: 1px solid #cfe0f4; border: 1px solid #cfe0f4;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -331,33 +197,33 @@ const progressWidth = computed((): string => { ...@@ -331,33 +197,33 @@ const progressWidth = computed((): string => {
} }
.module-badge { .module-badge {
height: 22px; height: var(--reception-dash-header-badge-height, 22px);
padding: 0 8px; padding: 0 var(--reception-dash-header-badge-padding-x, 8px);
border-radius: 999px; border-radius: 999px;
background-color: #e5effd; background-color: #e5effd;
border: 1px solid #c9ddf7; border: 1px solid #c9ddf7;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-right: 8px; margin-right: var(--reception-dash-header-badge-margin-right, 8px);
} }
.module-badge-text { .module-badge-text {
font-size: 10px; font-size: var(--reception-dash-header-badge-font-size, 10px);
font-weight: 600; font-weight: 600;
color: #4f6b95; color: #4f6b95;
} }
.tag-text { .tag-text {
font-size: 13px; font-size: var(--reception-dash-header-tag-font-size, 13px);
font-weight: 700; font-weight: 700;
color: #1f3a5a; color: #1f3a5a;
} }
.tag-arrow-icon { .tag-arrow-icon {
width: 14px; width: var(--reception-dash-header-arrow-icon-size, 14px);
height: 14px; height: var(--reception-dash-header-arrow-icon-size, 14px);
margin-left: 6px; margin-left: var(--reception-dash-header-arrow-icon-margin-left, 6px);
opacity: 0.75; opacity: 0.75;
} }
...@@ -365,22 +231,22 @@ const progressWidth = computed((): string => { ...@@ -365,22 +231,22 @@ const progressWidth = computed((): string => {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 8px; margin-bottom: var(--reception-dash-header-progress-row-margin-bottom, 8px);
} }
.progress-label-text { .progress-label-text {
font-size: 11px; font-size: var(--reception-dash-header-progress-label-font-size, 11px);
color: #94A3B8; color: #94A3B8;
} }
.progress-value-text { .progress-value-text {
font-size: 12px; font-size: var(--reception-dash-header-progress-value-font-size, 12px);
font-weight: 700; font-weight: 700;
color: #0f172a; color: #0f172a;
} }
.progress-bar-bg { .progress-bar-bg {
height: 8px; height: var(--reception-dash-header-progress-bar-height, 8px);
background-color: #cfdff3; background-color: #cfdff3;
border-radius: 999px; border-radius: 999px;
overflow: hidden; overflow: hidden;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!