From 7fe7b6182c2d407d28c2c9da1c070c3ce964e3e7 Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期二, 20 五月 2025 10:49:14 +0800 Subject: [PATCH] 1.移动端添加自定义navbar导航栏 --- eims-ui-mobile/src/pages/inspect/insp-record.vue | 42 ++++++++++++++++++++---------------------- 1 files changed, 20 insertions(+), 22 deletions(-) diff --git a/eims-ui-mobile/src/pages/inspect/insp-record.vue b/eims-ui-mobile/src/pages/inspect/insp-record.vue index fb20b64..d979f18 100644 --- a/eims-ui-mobile/src/pages/inspect/insp-record.vue +++ b/eims-ui-mobile/src/pages/inspect/insp-record.vue @@ -2,30 +2,25 @@ { layout: 'default', needLogin: true, - style: { - navigationBarTitleText: '鐐规璁板綍', - 'app-plus': { - titleNView: { - buttons: [ - { - text: '鎻愪氦', - fontSize: '14px', - color: '#FFFFFF', - }, - { - text: '', - fontSize: '24px', - color: '#FFFFFF', - }, - ], - }, - }, - }, + style: { navigationBarTitleText: '鐐规璁板綍', navigationStyle: 'custom' }, } </route> <template> <z-paging ref="paging" v-model="dataList" :auto="false" @query="queryList" show-refresher-update-time> <template #top> + <wd-navbar + title="鐐规璁板綍" + left-arrow + @click-left="goBack" + right-text="鎻愪氦" + @click-right="handleClickRight" + custom-style="background: #4D80F0;" + safeAreaInsetTop + > + <template #right> + <text v-if="isOperatorOrRepair()" class="text-white">鎻愪氦</text> + </template> + </wd-navbar> <wd-card type="rectangle"> <template #title> <view class="flex justify-between"> @@ -141,6 +136,7 @@ <script setup lang="ts"> import { ref } from 'vue' import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store' +import { isLeader, isOperatorOrRepair } from "@/utils/RoleUtils"; import { getInspStRecordList, getInspSt, @@ -227,11 +223,13 @@ const goBack = () => { uni.navigateBack() } -onNavigationBarButtonTap((e) => { - if (e.index === 0) { + +function handleClickRight() { + if(isOperatorOrRepair()){ handleConfirm() } -}) + +} const toggleCollapse = () => { isAllExpanded.value = !isAllExpanded.value -- Gitblit v1.9.3