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/maint/maint-order.vue |   51 ++++++++++++++++++++++++++-------------------------
 1 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/eims-ui-mobile/src/pages/maint/maint-order.vue b/eims-ui-mobile/src/pages/maint/maint-order.vue
index bd77876..7f2da57 100644
--- a/eims-ui-mobile/src/pages/maint/maint-order.vue
+++ b/eims-ui-mobile/src/pages/maint/maint-order.vue
@@ -2,25 +2,7 @@
 {
   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>
 
@@ -33,6 +15,19 @@
     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-cell>
         <template #title>
           <text class="text-color-gray">璁惧</text>
@@ -101,10 +96,9 @@
           <view class="flex justify-between">
             <view class="flex items-center menu-title-box">
               <view class="menu-indicator"></view>
-              <view class="ml-1 text-sm align-center w-[50%]">
+              <view class="ml-1 text-sm align-center">
                 <wd-text :text="item.maintName" :lines="1"></wd-text>
               </view>
-              <view class="text-color-gray ml-2 text-mini">{{ item.maintCode }}</view>
             </view>
 
             <view class="flex items-center w-[20%] justify-end">
@@ -114,9 +108,10 @@
             </view>
           </view>
         </template>
-        <view class="flex h-[140rpx]" items-center>
+        <view class="flex h-[200rpx]" items-center>
           <image class="slot-img text-center" src="/static/ico/ico-platform.png" />
           <view class="flex-1 text-color-gray text-xs flex-row">
+            <view class="mr-3 mt-2">淇濆吇鍗曞彿: {{ item.maintCode }}</view>
             <view class="mr-3 mt-2">璁″垝淇濆吇鏃ユ湡: {{ item.planTime }}</view>
             <view class="mr-3 mt-2">淇濆吇寮�濮嬫椂闂�: {{ item.startTime }}</view>
             <view class="mr-3 mt-2">淇濆吇缁撴潫鏃堕棿: {{ item.endTime }}</view>
@@ -434,11 +429,17 @@
 function reloadData() {
   initMaintSt(maintStId.value)
 }
-onNavigationBarButtonTap((e) => {
-  if (e.index === 0) {
+
+const goBack = () => {
+  uni.navigateBack()
+}
+
+function handleClickRight() {
+  if(isOperatorOrRepair()){
     handleUpdateMaintSt()
   }
-})
+
+}
 
 onLoad(() => {
   uni.$on('maint-order-refresh', reloadData)

--
Gitblit v1.9.3