From 1efdf8fa2f60cc6d9da42b319540d4c2df4b3e0a Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期六, 14 六月 2025 15:13:35 +0800 Subject: [PATCH] refactor(repair): 优化报修相关功能和页面展示 --- eims-ui-mobile/src/components/repair/res-card.vue | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-) diff --git a/eims-ui-mobile/src/components/repair/res-card.vue b/eims-ui-mobile/src/components/repair/res-card.vue index 230b442..dd7beb7 100644 --- a/eims-ui-mobile/src/components/repair/res-card.vue +++ b/eims-ui-mobile/src/components/repair/res-card.vue @@ -12,6 +12,7 @@ <wd-tag size="small" v-if="item.status === '1'" type="warning">宸叉帴鍗�</wd-tag> <wd-tag size="small" v-else-if="item.status === '2'" type="primary">缁翠慨涓�</wd-tag> <wd-tag size="small" v-else-if="item.status === '3'" type="success">宸插畬鎴�</wd-tag> + <wd-tag size="small" v-else-if="item.status === '4'" type="default">宸茶瘎浠�</wd-tag> </view> </view> </template> @@ -67,12 +68,13 @@ </view> </view> <view> - <template v-if="item.status === '3'"> + <template v-if="item.status === '3' || item.status === '4'"> <view class="h-full flex flex-col"> <wd-button size="small" icon="warn-bold" @click.stop="itemClick(item)"> 璇︽儏 </wd-button> <wd-button + v-if="isRequest" class="mt-4" size="small" icon="edit-outline" @@ -80,6 +82,17 @@ type="warning" > {{ item.fbId == null ? '鍐欒瘎浠�' : '鏌ョ湅璇勪环' }} + </wd-button> + <wd-button + v-else + class="mt-4" + size="small" + icon="edit-outline" + @click.stop="goToFeedBack(item)" + type="warning" + :disabled="item.fdId == null" + > + {{ item.fbId == null ? '鏆傛湭璇勪环' : '鏌ョ湅璇勪环' }} </wd-button> </view> </template> @@ -121,18 +134,23 @@ const userStore = useUserStore() const message = useMessage() const toast = useToast() -defineProps({ +const defineProps1 = defineProps({ item: { type: Object as () => RepairResVO, - required: true - } -}) + required: true, + }, +}); const emit = defineEmits(['click']) -function handleClick(item) { - emit('click', item) -} +// 浣跨敤璁$畻灞炴�э紝鍒ゆ柇褰撳墠鐢ㄦ埛鏄笉鏄姹備汉 +const isRequest = computed(() => { + if (defineProps1.item) { + console.log('isRequest', defineProps1.item.reqUser === userStore.userInfo.userId) + return userStore.userInfo.userId === defineProps1.item.reqUser + } + return false +}) /** * 寮�濮嬬淮淇� -- Gitblit v1.9.3