1b4b47c47399375f4d60b991b27fd4ff2dab13de..0c90ee0da99b01f899a3ddb0918ecaacfcf9f474
2026-03-19 gaoluyang
金鹰黄金app 1.巡检列表展示字段修改
0c90ee 对比 | 目录
2026-03-19 gaoluyang
金鹰黄金app 1.巡检上传添加查询条件
6a5f75 对比 | 目录
已修改1个文件
60 ■■■■■ 文件已修改
src/pages/inspectionUpload/index.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inspectionUpload/index.vue
@@ -3,6 +3,19 @@
    <!-- 页面头部 -->
    <PageHeader title="巡检上传" @back="goBack" />
    <!-- 搜索区域 -->
    <view class="search-section">
      <up-input
        v-model="searchAll"
        placeholder="请输入设备名称"
        prefixIcon="search"
        border="surround"
        :clearable="true"
        @change="handleSearch"
        @clear="handleClear"
      ></up-input>
    </view>
    <!-- 数据列表 -->
    <view class="table-section">
      <!-- 生产巡检列表 -->
@@ -51,8 +64,7 @@
            <view class="detail-item">
              <text class="detail-label">巡检状态</text>
              <view class="detail-value">
                <uni-tag v-if="item.fileStatus==2" text="已完成" size="small" type="success" inverted></uni-tag>
                <uni-tag v-else-if="item.fileStatus==1" text="巡检中" size="small" type="primary" inverted></uni-tag>
                <uni-tag v-if="item.status=='已巡检'" text="已巡检" size="small" type="success" inverted></uni-tag>
                <uni-tag v-else="" text="未巡检" size="small" type="warning" inverted></uni-tag>
              </view>
            </view>
@@ -320,6 +332,22 @@
// 异常状态
const hasException = ref(null) // null: 未选择, true: 存在异常, false: 正常
// 搜索相关
const searchAll = ref('')
const handleSearch = () => {
  pagesPames.current = 1
  taskTableData.value = []
  getList()
}
const handleClear = () => {
    searchAll.value = ''
  pagesPames.current = 1
  taskTableData.value = []
  getList()
}
// 上传配置
const uploadConfig = {
  action: "/file/upload",
@@ -422,7 +450,14 @@
  // 设置取消标志
  isRequestCancelled = false
  loading.value = true
  inspectionTaskList({...pagesPames}).then(res => {
  // 构建查询参数
  const params = { ...pagesPames }
  if (searchAll.value) {
    params.searchAll = searchAll.value
  }
  inspectionTaskList(params).then(res => {
    // 检查组件是否还存在且请求未被取消
    if (!isRequestCancelled) {
      // 处理不同的数据结构
@@ -2084,4 +2119,23 @@
  max-height: 60vh;
  display: block;
}
/* 搜索区域样式 */
.search-section {
  padding: 15px 20px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
:deep(.u-input) {
  width: 100%;
}
:deep(.u-input__content) {
  border-radius: 8px;
}
:deep(.u-input__content__field) {
  font-size: 14px;
}
</style>