| | |
| | | <!-- 页面头部 --> |
| | | <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"> |
| | | <!-- 生产巡检列表 --> |
| | |
| | | <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> |
| | |
| | | // 异常状态 |
| | | 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", |
| | |
| | | // 设置取消标志 |
| | | 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) { |
| | | // 处理不同的数据结构 |
| | |
| | | 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> |