|
|
@@ -6,7 +6,7 @@
|
|
|
<view class="search-box">
|
|
|
<image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
|
|
|
<input class="search-input" type="text" placeholder="搜索工单编号、风机编号" v-model="keyword" @confirm="handleSearch" />
|
|
|
- <text v-if="keyword && keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
|
|
|
+ <text v-if="keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -131,11 +131,11 @@
|
|
|
const orderInfoItem = item as orderInfo
|
|
|
const rawStatus = orderInfoItem.workOrderStatus
|
|
|
|
|
|
- if (!rawStatus) return ''
|
|
|
+ if (rawStatus==null) return ''
|
|
|
|
|
|
// 查找字典中对应的标签
|
|
|
const dictItem = statusDictList.value.find(dict => dict.dictValue === rawStatus)
|
|
|
- return dictItem ? dictItem.dictLabel : rawStatus
|
|
|
+ return dictItem!=null ? dictItem.dictLabel : rawStatus
|
|
|
}
|
|
|
|
|
|
const getPcsStationName = (item: any | null): string | null=> {
|
|
|
@@ -185,12 +185,6 @@
|
|
|
return getCreateTime(item)
|
|
|
}
|
|
|
|
|
|
- // 切换状态
|
|
|
- const switchStatus = (status: string): void => {
|
|
|
- currentStatus.value = status
|
|
|
- page.value = 1
|
|
|
- loadData(true)
|
|
|
- }
|
|
|
|
|
|
// 获取工单状态字典列表
|
|
|
const loadStatusDictList = async (): Promise<void> => {
|
|
|
@@ -224,7 +218,7 @@
|
|
|
|
|
|
// 调用 API,传递关键字参数
|
|
|
const searchKeyword = keyword.value.length > 0 ? keyword.value : null
|
|
|
- const result = await getOrderList(page.value, pageSize, searchKeyword, currentStatus.value || null)
|
|
|
+ const result = await getOrderList(page.value, pageSize, searchKeyword, currentStatus.value)
|
|
|
|
|
|
// 提取响应数据
|
|
|
const resultObj = result as UTSJSONObject
|
|
|
@@ -303,6 +297,13 @@
|
|
|
// #endif
|
|
|
}
|
|
|
|
|
|
+ // 切换状态
|
|
|
+ const switchStatus = (status: string): void => {
|
|
|
+ currentStatus.value = status
|
|
|
+ page.value = 1
|
|
|
+ loadData(true)
|
|
|
+ }
|
|
|
+
|
|
|
// 下拉刷新
|
|
|
const handleRefresh = async (): Promise<void> => {
|
|
|
refreshing.value = true
|