|
|
|
|
@ -304,10 +304,13 @@ async function fetchList(reset) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const keyword = searchKeyword.value.trim()
|
|
|
|
|
const deviceId = parseDeviceIdKeyword(keyword)
|
|
|
|
|
const params = {
|
|
|
|
|
pageNo: pageNo.value,
|
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
|
planNo: searchKeyword.value.trim() || undefined,
|
|
|
|
|
planNo: deviceId ? undefined : keyword || undefined,
|
|
|
|
|
deviceId: deviceId || undefined,
|
|
|
|
|
planType: selectedTaskType.value || undefined,
|
|
|
|
|
jobStatus: selectedJobStatus.value || undefined,
|
|
|
|
|
deviceLineId: selectedLineId.value || undefined
|
|
|
|
|
@ -325,6 +328,11 @@ async function fetchList(reset) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function parseDeviceIdKeyword(keyword) {
|
|
|
|
|
const match = String(keyword || '').trim().match(/-(\d+)$/)
|
|
|
|
|
return match ? Number(match[1]) : undefined
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function normalizePageData(res) {
|
|
|
|
|
const root = res && res.data !== undefined ? res.data : res
|
|
|
|
|
const candidateList = root?.list || root?.rows || root?.records || root?.data?.list || root?.data?.rows || root?.data?.records || []
|
|
|
|
|
|