From f0610c371668b042d36d7772cb04b49a2afc69ea Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期四, 24 四月 2025 14:51:56 +0800 Subject: [PATCH] 完成移动端保养 --- eims-ui-mobile/src/pages/inspect/insp-st.vue | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/eims-ui-mobile/src/pages/inspect/insp-st.vue b/eims-ui-mobile/src/pages/inspect/insp-st.vue index d380724..f53f836 100644 --- a/eims-ui-mobile/src/pages/inspect/insp-st.vue +++ b/eims-ui-mobile/src/pages/inspect/insp-st.vue @@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'default', + needLogin: true, style: { navigationBarTitleText: '鐐规姹囨��', }, @@ -28,11 +29,15 @@ </view> <view class="flex items-center"> - <text class="text-color-gray text-mini">{{ item.planTimeStr }}</text> + <text class="text-color-gray text-mini"> + {{ + viewMode === 'Day' ? item.planTimeStr : item?.planTimeStr?.substring(0, 7) || '' + }} + </text> </view> </view> </template> - <view class="flex h-[100rpx]" items-center> + <view class="flex h-[140rpx]" items-center> <image class="slot-img text-center" src="/static/images/camera.png" /> <view class="flex-1"> <view class="text-color-gray text-xs mt-1 flex"> @@ -50,13 +55,16 @@ <view class="text-color-gray text-xs mt-2 flex"> <text>鐘舵�侊細</text> <template v-if="item.recordCount === item.checkCount"> - <wd-icon class="icon-color-success" name="check-outline" size="40rpx"></wd-icon> + <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">宸插畬鎴�</text> </template> <template v-else> <wd-icon class="icon-color-base" name="detection" size="40rpx"></wd-icon> <text class="ml-1">杩涜涓�</text> </template> + </view> + <view class="text-color-gray text-xs mt-2 flex"> + 鍒涘缓鏃堕棿: {{item.createTime}} </view> </view> <wd-button size="small" icon="edit-outline" @click.stop="itemClick(item)">鏄庣粏</wd-button> @@ -69,6 +77,7 @@ <script setup lang="ts"> import { ref } from 'vue' import { getInspStList } from '@/service/inspect' +import { onShow } from '@dcloudio/uni-app' const viewMode = ref<string>('Day') const equName = ref<string>('鎵�鏈夎澶�') @@ -79,7 +88,7 @@ ]) const equList = ref<Record<string, any>[]>([{ label: '鎵�鏈夎澶�', value: '鎵�鏈夎澶�' }]) function handleViewMode({ value }) { - console.log(value) + reloadData() } function handleEquName({ value }) { console.log(value) @@ -91,10 +100,9 @@ const queryList = (pageNum?: number, pageSize?: number) => { // 杩欓噷鐨刾ageNo鍜宲ageSize浼氳嚜鍔ㄨ绠楀ソ锛岀洿鎺ヤ紶缁欐湇鍔″櫒鍗冲彲 // 杩欓噷鐨勮姹傚彧鏄紨绀猴紝璇锋浛鎹㈡垚鑷繁鐨勯」鐩殑缃戠粶璇锋眰锛屽苟鍦ㄧ綉缁滆姹傚洖璋冧腑閫氳繃paging.value.complete(璇锋眰鍥炴潵鐨勬暟缁�)灏嗚姹傜粨鏋滀紶缁檢-paging - getInspStList({ pageNum, pageSize }) + getInspStList({ pageNum, pageSize, viewMode: viewMode.value }) .then((res: any) => { // 璇峰嬁鍦ㄧ綉缁滆姹傚洖璋冧腑缁檇ataList璧嬪�硷紒锛佸彧闇�瑕佽皟鐢╟omplete灏卞彲浠ヤ簡 - console.log(res) paging.value.complete(res.rows) }) .catch((res) => { @@ -108,12 +116,18 @@ function itemClick(item) { const inspCode = `${item.equId}_${item.planTime}_${viewMode.value}` uni.navigateTo({ - url: `/pages/inspect/insp-record?inspCode=${inspCode}&equName=${item.equName}&assetNo=${item.assetNo}&planTimeStr=${item.planTimeStr}`, + url: `/pages/inspect/insp-record?id=${item.id}&createTime=${item.createTime}&inspCode=${inspCode}&specialNote=${item.specialNote ?? ''}&equName=${item.equName ?? ''}&assetNo=${item.assetNo ?? ''}&planTimeStr=${item.planTimeStr ?? ''}`, }) } +function reloadData() { + paging.value.reload() +} onLoad(() => { - queryList() + uni.$on('insp-st-refresh', reloadData) +}) +onUnload(() => { + uni.$off('insp-st-refres', reloadData) }) </script> -- Gitblit v1.9.3