From 17aaffd6f60443a070f8f9aab29c6f53d44795de Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期五, 06 六月 2025 09:15:17 +0800 Subject: [PATCH] 添加故障时间 --- eims-ui-mobile/src/pages/inspect/insp-record.vue | 72 +++++++++++++++++++++++------------- 1 files changed, 46 insertions(+), 26 deletions(-) diff --git a/eims-ui-mobile/src/pages/inspect/insp-record.vue b/eims-ui-mobile/src/pages/inspect/insp-record.vue index 99efef5..f566511 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"> @@ -83,11 +78,11 @@ </wd-button> </wd-cell> <wd-collapse v-model="collSelects" title="鐐规椤�" ref="collapseRef"> - <wd-collapse-item :name="item.id" v-for="(item, index) in dataList"> + <wd-collapse-item :name="item.id" v-for="(item, index) in dataList" disabled> <template #title="{ expanded, disabled, isFirst }"> <view class="flex justify-between"> - <view class="flex justify-center items-center"> - <text class="text-sm">{{ item.inspName }}</text> + <view class="flex justify-center items-center" style="max-width: 60%;"> + <text class="text-sm" >{{ item.inspName }}</text> </view> <view class="flex items-center"> @@ -123,6 +118,22 @@ </template> </wd-cell> <view class="w-full h-[1px] bg-base"></view> + <wd-input + label="杩愯鏃堕棿" + label-width="200rpx" + clearable + v-model="inspSt.runTimes" + placeholder="璇疯緭鍏ヨ繍琛屾椂闂�(h)" + inputmode="numeric" + /> + <wd-input + label="鏁呴殰鏃堕棿" + label-width="200rpx" + clearable + v-model="inspSt.faultTimes" + placeholder="璇疯緭鍏ユ晠闅滄椂闂�(h)" + inputmode="numeric" + /> <wd-textarea label="鐗硅浜嬮」" label-width="200rpx" @@ -141,6 +152,7 @@ <script setup lang="ts"> import { ref } from 'vue' import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store' +import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' import { getInspStRecordList, getInspSt, @@ -174,6 +186,8 @@ status: string inspUser: number | string specialNote: string + runTimes: number + faultTimes: number } const dataChange = ref(false) @@ -193,6 +207,8 @@ status: '', inspUser: '', specialNote: '', + runTimes: 0, + faultTimes: 0, }) const paging = ref(null) @@ -227,11 +243,13 @@ const goBack = () => { uni.navigateBack() } -onNavigationBarButtonTap((e) => { - if (e.index === 0) { + +function handleClickRight() { + if(isOperatorOrRepair()){ handleConfirm() } -}) + +} const toggleCollapse = () => { isAllExpanded.value = !isAllExpanded.value @@ -265,10 +283,10 @@ updateInspRecordBatch(params) .then((res: any) => { updateInspSt(resolve) - toast.success('鎿嶄綔鎴愬姛') }) .catch((res) => { console.error(res) + toast.error('鎿嶄綔澶辫触') }) } function updateInspSt(resolve: any) { @@ -276,12 +294,14 @@ inspSt.status = '1' updateInspectSt(inspSt) .then((res: any) => { + toast.success('鎿嶄綔鎴愬姛') paging.value.reload() uni.$emit('insp-st-refresh') resolve(true) }) .catch((res) => { console.error(res) + toast.error('鎿嶄綔澶辫触') }) } -- Gitblit v1.9.3