车间能级提升-智能设备管理系统
zhuguifei
2025-04-27 d7862b2890b68743ec9c4fc05800bb23ec9b412e
eims-ui-mobile/src/pages/equ/equ-list.vue
@@ -31,9 +31,9 @@
            </view>
          </view>
        </template>
        <view class="flex h-[80rpx]" @click.stop="itemClick(item)">
        <view class="flex h-[80rpx] items-center" @click.stop="itemClick(item)">
          <image class="slot-img text-center" src="/static/images/camera.png" />
          <view>
          <view class="flex-1">
            <view class="text-color-base">
              {{ item.equName }}
              <text class="text-color-gray ml-2 text-mini">{{ item.modelNo }}</text>
@@ -41,6 +41,15 @@
            <view class="text-color-gray text-xs mt-1">
              {{ item.location }} | {{ item.madeIn }}
            </view>
          </view>
          <view v-if="isSelectEqu">
            <wd-button
              size="small"
              icon="edit-outline"
              @click.stop="handleSelectEqu(item)"
            >
              选中
            </wd-button>
          </view>
        </view>
      </wd-card>
@@ -78,8 +87,7 @@
  getEquList({ pageNum, pageSize })
    .then((res: any) => {
      // 请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了
      console.log(res)
      paging.value.complete(res.rows)
      paging.value.completeByTotal(res.rows, res.total)
    })
    .catch((res) => {
      // 如果请求失败写paging.value.complete(false),会自动展示错误页面
@@ -94,6 +102,14 @@
 * @param item
 */
function itemClick(item: any) {
}
/**
 * 其它页面选择设备
 * @param item
 */
function handleSelectEqu(item: any) {
  if (isSelectEqu.value) {
    emitSelectEqu(item)
    uni.navigateBack()
@@ -116,9 +132,9 @@
  const instance: any = getCurrentInstance().proxy
  const event = instance.getOpenerEventChannel()
  eventChannel.value = event
  event.on('handleSelectEqu', function (data) {
  event.on('OnSelectEqu', function (data) {
    isSelectEqu.value = true
    console.log('handleSelectEqu', data)
    console.log('OnSelectEqu', data)
  })
})
</script>