Commit 3ebe980d by liimin

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

2 parents e5af7338 2fa970ef
/* 登录选择账号页 横屏 1080 档位适配
* 通过 LayoutRoot 上的 .mode-landscape.res-1080 类控制,仅在横屏 1080 档时生效。
*/
.mode-landscape.res-1080 {
/* 示例:可根据登录页设计调整根容器
* .page-container {
* padding: 0 var(--l-spacing-lg);
* }
*/
}
/* 精品页 横屏 1920 档位适配(预留) */
.mode-landscape.res-1920 {
/* 示例:后续可在此定义 1920 档变量 */
}
/* 登录选择账号页 横屏 1920 档位适配
* 大屏(如 1920 宽度)下,可在此增加更宽松的留白和布局。
*/
.mode-landscape.res-1920 {
/* 示例:后续按实际设计稿补充
* .page-container {
* max-width: 1600px;
* margin: 0 auto;
* }
*/
}
/* 登录页 竖屏 1080 档位适配(如 360 x 800 等宽度归为 1080 档)
* 通过 .login-page 避免影响其他页面;仅在手机竖屏时生效。
*/
.mode-portrait.res-1080 .login-page {
.layout {
justify-content: flex-start;
align-items: stretch;
padding: 32px 24px;
}
.login {
align-items: stretch;
margin-top: 16px;
max-width: 320px;
margin-left: auto;
margin-right: auto;
}
.login .title {
font-size: 28px;
margin-bottom: 12px;
}
.login .sub-title {
font-size: 14px;
margin: 12px 0 20px;
}
.login .input {
width: 100%;
height: 48px;
border-radius: 24px;
margin-bottom: 16px;
}
.login .btn {
width: 100%;
height: 48px;
margin-top: 8px;
font-size: 18px;
}
.form-footer {
padding-left: 0;
margin-top: 16px;
}
.app-code {
bottom: 12px;
/* 手机端登录页 APP 编码:完全使用固定像素,不参与变量缩放 */
font-size: 10px !important;
line-height: 14px;
left: 50%;
transform: translateX(-50%) scale(0.85);
}
}
/* 登录选择账号页 竖屏 1920 档位适配(预留)
* 如后续有竖屏大屏设备需求,可在此补充。
*/
.mode-portrait.res-1920 {
/* 预留占位,不影响现有布局 */
}
......@@ -6,9 +6,7 @@
"versionCode": "126",
"uni-app-x": {
},
/* 快应用特有相关 */
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "",
"setting": {
......@@ -38,11 +36,7 @@
"xxhdpi": "",
"xxxhdpi": ""
}
},
"orientation": [
"portrait-primary",
"landscape-primary"
]
}
}
},
"app-android": {
......@@ -54,8 +48,8 @@
"system": {}
},
"lime-sqlite": {},
"uni-recorder-x": {}, // 录音模块
"uni-recorder": {}, // 录音模块
"uni-recorder-x": {},
"uni-recorder": {},
"uni-websocket": {}
},
"icons": {
......@@ -67,10 +61,13 @@
"splashScreens": {
"default": {}
},
<<<<<<< HEAD
"orientation": [
"portrait-primary",
"landscape-primary"
],
=======
>>>>>>> 2fa970efe59b5cb4687e79f79cc3a1b185cff288
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
......@@ -94,11 +91,15 @@
"distribute": {
"modules": {},
"icons": {},
<<<<<<< HEAD
"splashScreens": {},
"orientation": [
"portrait-primary",
"landscape-primary"
]
=======
"splashScreens": {}
>>>>>>> 2fa970efe59b5cb4687e79f79cc3a1b185cff288
}
},
"web": {
......
......@@ -65,7 +65,7 @@ const submittedResultLabel = computed((): string => {
})
const reviewTabLabel = computed((): string => {
return props.reviewTabIndex == 0 ? '已复盘' : '未复盘'
return props.reviewTabIndex == 0 ? '未复盘' : '已复盘'
})
</script>
......
<template>
<!-- 客户录入列表:与 customervisits.customerInfoPage 字段对齐(ownerPhone / brandModel / customerTagName / arrivalDate / ownerName) -->
<view class="customer-entry-list">
<view :class="['customer-entry-list', isLandscape ? 'customer-entry-list-landscape' : '']">
<!-- 首次加载:列表为空时,用骨架卡片占位,避免空白 -->
<view
v-if="loading && (props.customerList == null || props.customerList.length == 0)"
v-for="i in skeletonCardCount"
:key="'entry-skeleton-' + i"
class="list-card list-card-entry glass-card"
:class="['list-card', 'list-card-entry', 'glass-card', isLandscape ? 'list-card-entry-landscape' : '']"
>
<un-skeleton rows="3" title loading></un-skeleton>
</view>
......@@ -14,7 +14,7 @@
v-else
v-for="item in props.customerList"
:key="getStr(item, 'id')"
class="list-card list-card-entry glass-card"
:class="['list-card', 'list-card-entry', 'glass-card', isLandscape ? 'list-card-entry-landscape' : '']"
@click="onEntryCardClick(item)"
@longpress="onEntryCardLongPress(item)"
>
......@@ -58,7 +58,7 @@
</template>
<script setup lang="uts">
import { computed, ref, watch } from 'vue'
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
const props = defineProps<{
/** 客户档案列表(由父级拉取并传入) */
......@@ -72,6 +72,31 @@ const props = defineProps<{
const loading = computed<boolean>(() => props.loading === true)
const skeletonCardCount = 3
/** 是否横屏(w > h)。uni-app x UTS 当前编译目标不支持 onWindowResize,使用轮询响应旋转 */
const isLandscape = ref(false)
let orientationPollId = 0
const ORIENTATION_POLL_MS = 400
function syncOrientation(): void {
const info = uni.getWindowInfo()
// 宽高优先取 systemInfo(部分机型旋转后 getWindowInfo 可能刷新不及时)
const sys = uni.getSystemInfoSync()
const sysSw = sys.screenWidth
const sysSh = sys.screenHeight
const ww = info.windowWidth
const wh = info.windowHeight
const sw = info.screenWidth
const sh = info.screenHeight
const w = sysSw > 0 ? sysSw : (sw > 0 ? sw : ww)
const h = sysSh > 0 ? sysSh : (sh > 0 ? sh : wh)
const nextLandscape = w > h
if (isLandscape.value != nextLandscape) {
isLandscape.value = nextLandscape
}
}
const emit = defineEmits<{
/** 点击卡片:打开客户档案详情 */
'entry-click': [item: UTSJSONObject]
......@@ -91,6 +116,21 @@ watch(
}
)
onMounted((): void => {
syncOrientation()
orientationPollId = setInterval((): void => {
syncOrientation()
}, ORIENTATION_POLL_MS)
})
onUnmounted((): void => {
const id = orientationPollId
if (id > 0) {
clearInterval(id)
orientationPollId = 0
}
})
function getStr(data: UTSJSONObject, key: string): string {
const v = data[key]
if (v == null) {
......@@ -229,6 +269,12 @@ function onEntryCardMaskDelete(item: UTSJSONObject): void {
width: 100%;
}
.customer-entry-list-landscape {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.glass-card {
background-color: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(255, 255, 255, 0.6);
......@@ -248,6 +294,10 @@ function onEntryCardMaskDelete(item: UTSJSONObject): void {
overflow: hidden;
}
.list-card-entry-landscape {
width: 49%;
}
.entry-card-mask {
position: absolute;
left: 0;
......
<template>
<!-- 接待复盘记录列表:与接待接口字段对齐,数据由父级拉取后传入 -->
<view class="reception-record-list">
<view :class="['reception-record-list', isLandscape ? 'reception-record-list-landscape' : '']">
<!-- 首次加载:列表为空时,用骨架卡片占位,避免空白 -->
<view
v-if="!loading && (props.receptionRecordList == null || props.receptionRecordList.length == 0)"
v-for="i in skeletonCardCount"
:key="'reception-skeleton-' + i"
class="list-card glass-card"
:class="['list-card', 'glass-card', isLandscape ? 'list-card-landscape' : '']"
>
<un-skeleton rows="3" title loading></un-skeleton>
</view>
......@@ -14,7 +14,7 @@
v-else
v-for="(item, idx) in props.receptionRecordList"
:key="getStr(item, 'batchId') != '' ? getStr(item, 'batchId') + '-' + idx : 'recv-' + idx"
class="list-card glass-card"
:class="['list-card', 'glass-card', isLandscape ? 'list-card-landscape' : '']"
@click="onCardClick(item)"
>
<un-skeleton :rows="3" title :loading="loading">
......@@ -48,7 +48,7 @@
</template>
<script setup lang="uts">
import { computed } from 'vue'
import { computed, onMounted, onUnmounted, ref } from 'vue'
const props = defineProps<{
/** 接待记录列表(由父级拉取并传入) */
......@@ -60,11 +60,51 @@ const props = defineProps<{
const loading = computed<boolean>(() => props.loading === true)
const skeletonCardCount = 3
/** 是否横屏(w > h)。uni-app x UTS 当前编译目标不支持 onWindowResize,使用轮询响应旋转 */
const isLandscape = ref(false)
let orientationPollId = 0
const ORIENTATION_POLL_MS = 400
function syncOrientation(): void {
const info = uni.getWindowInfo()
// 宽高优先取 systemInfo(部分机型旋转后 getWindowInfo 可能刷新不及时)
const sys = uni.getSystemInfoSync()
const sysSw = sys.screenWidth
const sysSh = sys.screenHeight
const ww = info.windowWidth
const wh = info.windowHeight
const sw = info.screenWidth
const sh = info.screenHeight
const w = sysSw > 0 ? sysSw : (sw > 0 ? sw : ww)
const h = sysSh > 0 ? sysSh : (sh > 0 ? sh : wh)
const nextLandscape = w > h
if (isLandscape.value != nextLandscape) {
isLandscape.value = nextLandscape
}
}
const emit = defineEmits<{
/** 点击卡片:父级根据 filterTabIndex 等处理详情或 toast */
'reception-click': [item: UTSJSONObject]
}>()
onMounted((): void => {
syncOrientation()
orientationPollId = setInterval((): void => {
syncOrientation()
}, ORIENTATION_POLL_MS)
})
onUnmounted((): void => {
const id = orientationPollId
if (id > 0) {
clearInterval(id)
orientationPollId = 0
}
})
function getStr(data: UTSJSONObject, key: string): string {
const v = data[key]
if (v == null) {
......@@ -90,14 +130,7 @@ function getReviewFlagText(data: UTSJSONObject): string {
if (v == null) {
return '未复盘'
}
if (typeof v == 'number') {
return v == 0 ? '已复盘' : '未复盘'
}
const n = parseFloat(`${v}`)
if (isNaN(n)) {
return '未复盘'
}
return n == 0 ? '已复盘' : '未复盘'
return v == 0 ? '已复盘' : '未复盘'
}
/** orderFinishFlag:false/0 为战败,true/非 0 为成功;未知则不展示角标(兼容接口 0/1) */
......@@ -209,6 +242,12 @@ function onCardClick(item: UTSJSONObject): void {
width: 100%;
}
.reception-record-list-landscape {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.glass-card {
background-color: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(255, 255, 255, 0.6);
......@@ -223,6 +262,10 @@ function onCardClick(item: UTSJSONObject): void {
margin-bottom: 12px;
}
.list-card-landscape {
width: 49%;
}
.card-header-row {
flex-direction: row;
justify-content: space-between;
......
<template>
<view class="list-content-wrapper">
<scroll-view
class="list-scroll-view"
:scroll-y="true"
:lower-threshold="120"
@scrolltolower="emit('scrollLower')"
>
<!-- 横屏分栏时:子 Tab + 筛选区固定在列表上方,仅下方列表滚动,避免随滚动移出视区 -->
<view v-if="stickyHeader == true" class="list-header-fixed">
<view class="sub-tabs-row">
<view class="sub-tabs-shell">
<view
......@@ -47,6 +43,57 @@
@switch-unsubmitted-pending-tab="emit('switchUnsubmittedPendingTab', $event)"
/>
</view>
</view>
<scroll-view
:class="['list-scroll-view', stickyHeader == true ? 'list-scroll-view--under-fixed-header' : 'list-scroll-view--full-height']"
:scroll-y="true"
:lower-threshold="120"
@scrolltolower="emit('scrollLower')"
>
<template v-if="stickyHeader != true">
<view class="sub-tabs-row">
<view class="sub-tabs-shell">
<view
class="sub-tab-item"
:class="{ 'sub-tab-active': listSubTabIndex == 0 }"
@click="emit('switchListSubTab', 0)"
>
<text class="sub-tab-title" :class="{ 'sub-tab-title-active': listSubTabIndex == 0 }">客户录入</text>
<text class="sub-tab-caption" :class="{ 'sub-tab-caption-active': listSubTabIndex == 0 }">线索跟进</text>
</view>
<view
class="sub-tab-item"
:class="{ 'sub-tab-active': listSubTabIndex == 1 }"
@click="emit('switchListSubTab', 1)"
>
<text class="sub-tab-title" :class="{ 'sub-tab-title-active': listSubTabIndex == 1 }">接待复盘</text>
<text class="sub-tab-caption" :class="{ 'sub-tab-caption-active': listSubTabIndex == 1 }">流程闭环</text>
</view>
</view>
</view>
<view class="filter-section" :class="{ 'filter-section--wrap': receptionFilterNarrowMode }">
<ReceptionListPrimaryFilter
:list-sub-tab-index="listSubTabIndex"
:entry-filter-index="entryFilterIndex"
:filter-tab-index="filterTabIndex"
@switch-entry-filter-tab="emit('switchEntryFilterTab', $event)"
@switch-filter-tab="emit('switchFilterTab', $event)"
@customer-entry-click="emit('customerEntryClick')"
/>
<ReceptionListSecondaryFilter
:list-sub-tab-index="listSubTabIndex"
:filter-tab-index="filterTabIndex"
:submitted-result-tab-index="submittedResultTabIndex"
:review-tab-index="reviewTabIndex"
:unsubmitted-pending-tab-index="unsubmittedPendingTabIndex"
@open-submitted-result-picker="emit('openSubmittedResultPicker')"
@open-review-picker="emit('openReviewPicker')"
@switch-unsubmitted-pending-tab="emit('switchUnsubmittedPendingTab', $event)"
/>
</view>
</template>
<view class="list-container">
<view v-if="listSubTabIndex == 0" class="right-tab-list-panel">
......@@ -92,6 +139,8 @@ import ReceptionListPrimaryFilter from '../filters/ReceptionListPrimaryFilter.uv
import ReceptionListSecondaryFilter from '../filters/ReceptionListSecondaryFilter.uvue'
const props = defineProps<{
/** 横屏分栏时为 true:子 Tab + 筛选区不参与纵向滚动,固定在列表区域顶部 */
stickyHeader?: boolean
listSubTabIndex: number
receptionFilterNarrowMode: boolean
entryFilterIndex: number
......@@ -143,7 +192,24 @@ const showReceptionEmpty = computed((): boolean => {
flex: 1;
min-height: 0;
width: 100%;
height: auto;
}
/* 竖屏:单独占满父级,保证 scroll-view 有确定高度从而触发滚动与 scrolltolower */
.list-scroll-view--full-height {
height: 100%;
}
/* 横屏固定头部:仅占用减去头部后的剩余高度,避免与顶部块重叠 */
.list-scroll-view--under-fixed-header {
flex: 1;
min-height: 0;
}
.list-header-fixed {
flex-direction: column;
flex-shrink: 0;
width: 100%;
z-index: 1;
}
.sub-tabs-row {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!