车间能级提升-智能设备管理系统
zhuguifei
9 天以前 453f63fd6cd6466222304df619e62b3a5667ca68
eims-ui-mobile/src/pages/inspect/insp-st.vue
@@ -11,6 +11,8 @@
<template>
  <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
    <template #top>
      <!-- 增加一个搜索栏 -->
      <wd-search v-model="searchValue" @search="handleSearch"></wd-search>
      <wd-tabs v-model="activeTab" @change="handleTabChange">
        <wd-tab title="待点检"></wd-tab>
        <wd-tab title="待确认"></wd-tab>
@@ -42,9 +44,15 @@
            <view class="text-color-gray text-sm mt-1 flex">
              <text class="mr-3">总数: {{ item.recordCount }}</text>
              |
              <template v-if="activeTab === 0">
                <text class="mx-3">未点检: {{ item.unCheckCount }}</text>
                |
              </template>
              <template v-else>
                <text class="mx-3">待确认: {{ item.dqrCount }}</text>
                |
              </template>
              <text class="mx-3">已点检: {{ item.checkCount }}</text>
              |
              <text class="ml-3">未点检: {{ item.unCheckCount }}</text>
            </view>
            <view class="text-color-gray text-sm mt-2 flex">
              <text class="mr-3">正常: {{ item.normalNum }}</text>
@@ -54,12 +62,12 @@
            <view class="text-color-gray text-sm mt-2 flex">
              <text>状态:</text>
              <template v-if="item.status === '1'">
                <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon>
                <text class="ml-1">已完成</text>
                <wd-icon class="icon-color-warning" name="check-outline" size="34rpx"></wd-icon>
                <text class="ml-1">待确认</text>
              </template>
              <template v-else-if="item.status === '2'">
                <wd-icon class="icon-color-warning" name="check-outline" size="34rpx"></wd-icon>
                <text class="ml-1">已确认</text>
                <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>
@@ -79,7 +87,7 @@
import { getInspStList } from '@/service/inspect'
import dayjs from 'dayjs'
import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store'
import { isLeader, isLineOrRepair, isOperator } from "@/utils/RoleUtils";
import { isLeader, isLineOrRepair, isOperator } from '@/utils/RoleUtils'
// 标签页相关
const activeTab = ref(0) // 默认选中第一个标签页(待点检)
@@ -88,6 +96,7 @@
const equName = ref<string>('所有设备')
const filterDate = ref<string>('1')
const status = ref<string>('0') // 默认为待点检状态
const searchValue = ref<string>('')
const viewModeList = ref<Record<string, any>[]>([
  { label: '日视图', value: 'Day' },
@@ -137,6 +146,9 @@
    pageSize,
    viewMode: viewMode.value,
    status: status.value, // 添加状态筛选
    params: {
      searchValue: searchValue.value,
    },
  }
  if (filterDate.value === '1') {
    params.planTime = dayjs().format('YYYY-MM-DD')
@@ -172,6 +184,11 @@
  })
}
function handleSearch() {
  console.log('handleSearch')
  paging.value.reload()
}
function reloadData() {
  paging.value.reload()
}