Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c8087b44
authored
Mar 26, 2026
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(HomeFrame, ReceptionDetail): 移除嵌入模式和导航栏,简化接待详情组件
1 parent
edc402f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
88 deletions
apps/uniappX/uniapp-x-tape/components/HomeFrame/ReceptionCenter/receptionDetail.uvue
apps/uniappX/uniapp-x-tape/components/HomeFrame/index.uvue
apps/uniappX/uniapp-x-tape/components/HomeFrame/ReceptionCenter/receptionDetail.uvue
View file @
c8087b4
<template>
<template>
<view class="detail-container">
<view class="detail-container">
<!-- 顶部导航栏 -->
<view class="glass-header" :class="{ 'header-shadow': headerShadow }">
<view class="header-left" @click="onBack">
<text class="header-icon">‹</text>
</view>
<text class="header-title">接待详情</text>
</view>
<!-- 主内容区:可滚动 -->
<!-- 主内容区:可滚动 -->
<scroll-view class="main-scroll" scroll-y="true"
@scroll="onMainScroll"
>
<scroll-view class="main-scroll" scroll-y="true">
<!-- 客户卡片 -->
<!-- 客户卡片 -->
<view class="customer-card">
<view class="customer-card">
<view class="card-top">
<view class="card-top">
...
@@ -166,16 +158,10 @@
...
@@ -166,16 +158,10 @@
<script setup lang="uts">
<script setup lang="uts">
import { ref } from "vue";
import { ref } from "vue";
// 嵌入模式:为 true 时返回按钮 emit close,否则执行 uni.navigateBack
defineProps<{
const props = defineProps<{
embedded?: boolean
item?: UTSJSONObject
item?: UTSJSONObject
}>();
}>();
const emit = defineEmits<{
close: []
}>();
// ── Tab 数据 ─────────────────────────────────────────────────────────────────
// ── Tab 数据 ─────────────────────────────────────────────────────────────────
type TabItem = {
type TabItem = {
label: string;
label: string;
...
@@ -190,22 +176,12 @@ const tabList: TabItem[] = [
...
@@ -190,22 +176,12 @@ const tabList: TabItem[] = [
const activeTabIndex = ref(0);
const activeTabIndex = ref(0);
const inputValue = ref("");
const inputValue = ref("");
const headerShadow = ref(false);
// ── 切换 Tab ─────────────────────────────────────────────────────────────────
// ── 切换 Tab ─────────────────────────────────────────────────────────────────
function switchTab(idx: number): void {
function switchTab(idx: number): void {
activeTabIndex.value = idx;
activeTabIndex.value = idx;
}
}
// ── 返回 ─────────────────────────────────────────────────────────────────────
function onBack(): void {
if (props.embedded === true) {
emit("close");
} else {
uni.navigateBack();
}
}
// ── 快捷操作 ─────────────────────────────────────────────────────────────────
// ── 快捷操作 ─────────────────────────────────────────────────────────────────
function onQualityReport(): void {
function onQualityReport(): void {
uni.showToast({ title: "质检报告", icon: "none" });
uni.showToast({ title: "质检报告", icon: "none" });
...
@@ -219,19 +195,6 @@ function onPlay(): void {
...
@@ -219,19 +195,6 @@ function onPlay(): void {
uni.showToast({ title: "播放", icon: "none" });
uni.showToast({ title: "播放", icon: "none" });
}
}
// ── 滚动时头部阴影 ───────────────────────────────────────────────────────────
function onMainScroll(e: any): void {
const obj = e as UTSJSONObject;
const evtDetail = obj['detail'] as UTSJSONObject | null;
if (evtDetail != null) {
const scrollTop = evtDetail["scrollTop"];
if (scrollTop != null) {
const top = scrollTop as number;
headerShadow.value = top > 10;
}
}
}
// ── 发送 ───────────────────────────────────────────────────────────────────
// ── 发送 ───────────────────────────────────────────────────────────────────
function onSend(): void {
function onSend(): void {
if (inputValue.value != null && inputValue.value != "") {
if (inputValue.value != null && inputValue.value != "") {
...
@@ -255,45 +218,6 @@ function onSend(): void {
...
@@ -255,45 +218,6 @@ function onSend(): void {
background-color: #F8FAFC;
background-color: #F8FAFC;
}
}
/* ── 顶部导航 ───────────────────────────────────────────────────────────────── */
.glass-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
padding-top: 44px;
background-color: rgba(255, 255, 255, 0.9);
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #F3F4F6;
}
.header-left {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.header-icon {
font-size: 24px;
color: #374151;
}
.header-title {
flex: 1;
font-size: 18px;
font-weight: 700;
color: #1F2937;
text-align: center;
}
.header-shadow {
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */
.main-scroll {
.main-scroll {
flex: 1;
flex: 1;
...
...
apps/uniappX/uniapp-x-tape/components/HomeFrame/index.uvue
View file @
c8087b4
...
@@ -56,9 +56,7 @@
...
@@ -56,9 +56,7 @@
<ReceptionCenterCenter @show-reception-detail="onShowReceptionDetail" />
<ReceptionCenterCenter @show-reception-detail="onShowReceptionDetail" />
</view>
</view>
<view v-show="showReceptionDetail" class="reception-detail-inner">
<view v-show="showReceptionDetail" class="reception-detail-inner">
<ReceptionDetail :embedded="true"
<ReceptionDetail :item="receptionDetailItem" />
:item="receptionDetailItem"
@close="onReceptionDetailClose" />
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -113,9 +111,7 @@
...
@@ -113,9 +111,7 @@
<ReceptionCenterCenter :only-right="true" @show-reception-detail="onShowReceptionDetail" />
<ReceptionCenterCenter :only-right="true" @show-reception-detail="onShowReceptionDetail" />
</view>
</view>
<view v-show="showReceptionDetail" class="reception-detail-inner">
<view v-show="showReceptionDetail" class="reception-detail-inner">
<ReceptionDetail :embedded="true"
<ReceptionDetail :item="receptionDetailItem" />
:item="receptionDetailItem"
@close="onReceptionDetailClose" />
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -223,10 +219,6 @@ function onShowReceptionDetail(item: UTSJSONObject): void {
...
@@ -223,10 +219,6 @@ function onShowReceptionDetail(item: UTSJSONObject): void {
showReceptionDetail.value = true;
showReceptionDetail.value = true;
}
}
function onReceptionDetailClose(): void {
showReceptionDetail.value = false;
}
function onStartClick(): void {
function onStartClick(): void {
emit("start");
emit("start");
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment