Преглед изворни кода

调整设备认领交互提示、锅炉注释掉部件分组

yangguanjin пре 2 недеља
родитељ
комит
5768f9ca45

+ 5 - 3
src/pages/equipment/detail/components/BoilerInspectProject.vue

@@ -9,7 +9,8 @@
     >
     >
       <view class="report-list">
       <view class="report-list">
         <view v-for="([part, reportArr], index) in reportGroupedList" :key="index">
         <view v-for="([part, reportArr], index) in reportGroupedList" :key="index">
-          <view v-if="part.id != null" class="part-card">
+          <!-- 暂时注释掉的部件分组逻辑 -->
+          <!-- <view v-if="part.id != null" class="part-card">
             <view class="part-card-header">
             <view class="part-card-header">
               <text class="part-card-header-text">{{ part.partName }}</text>
               <text class="part-card-header-text">{{ part.partName }}</text>
               <view class="part-card-header-btn-group">
               <view class="part-card-header-btn-group">
@@ -231,9 +232,10 @@
                 </view>
                 </view>
               </view>
               </view>
             </view>
             </view>
-          </view>
+          </view> -->
 
 
-          <view v-else v-for="item in reportArr" :key="item.id" class="report-item">
+          <!-- 如果开放了部件分组的模板,这里要加上一个 v-else 指令 -->
+          <view v-for="item in reportArr" :key="item.id" class="report-item">
             <view class="item-top" @click="handleSelectProject(item)">
             <view class="item-top" @click="handleSelectProject(item)">
               <view class="top-left">
               <view class="top-left">
                 <radio
                 <radio

+ 1 - 17
src/pages/unClaim/components/TaskItem.vue

@@ -79,7 +79,7 @@
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
-import { ref, computed, watch } from 'vue'
+import { computed } from 'vue'
 import { PressureCheckTypeMap } from '@/pages/unClaim/types'
 import { PressureCheckTypeMap } from '@/pages/unClaim/types'
 import TaskItemInfo from './TaskItemInfo.vue'
 import TaskItemInfo from './TaskItemInfo.vue'
 
 
@@ -97,22 +97,6 @@ const emit = defineEmits<{
   pdfDetail: [businessType: number, signFilePdf: string, orderId: string]
   pdfDetail: [businessType: number, signFilePdf: string, orderId: string]
 }>()
 }>()
 
 
-const isClaim = ref(props.item.isClaim)
-
-watch(
-  () => props.item.isClaim,
-  (newVal) => {
-    isClaim.value = newVal
-  },
-)
-
-// 暴露方法给父组件
-defineExpose({
-  setIsClaim: (status: boolean) => {
-    isClaim.value = status
-  },
-})
-
 const isClaimed = () => {
 const isClaimed = () => {
   const taskStatus = props.item.taskStatus
   const taskStatus = props.item.taskStatus
   return taskStatus !== 100
   return taskStatus !== 100

+ 0 - 1
src/pages/unClaim/unClaimList.vue

@@ -244,7 +244,6 @@ const handleClaimTask = async (id: string, isClaim: boolean) => {
     })
     })
     if (result?.code === 0 && result?.data) {
     if (result?.code === 0 && result?.data) {
       uni.showToast({ title: `${isClaim ? '认领' : '取消认领'}成功`, icon: 'success' })
       uni.showToast({ title: `${isClaim ? '认领' : '取消认领'}成功`, icon: 'success' })
-      itemRefs[id]?.setIsClaim(isClaim)
       refreshList()
       refreshList()
     } else {
     } else {
       const msg = result?.msg || `${isClaim ? '认领' : '取消认领'}失败`
       const msg = result?.msg || `${isClaim ? '认领' : '取消认领'}失败`