Showing
2 changed files
with
20 additions
and
8 deletions
| @@ -388,7 +388,10 @@ export const step1Schemas: FormSchema[] = [ | @@ -388,7 +388,10 @@ export const step1Schemas: FormSchema[] = [ | ||
| 388 | api: async (params: QueryDeviceProfileOtaPackagesType) => { | 388 | api: async (params: QueryDeviceProfileOtaPackagesType) => { |
| 389 | if (!params.deviceProfileId) return []; | 389 | if (!params.deviceProfileId) return []; |
| 390 | const result = await getDeviceProfileOtaPackages(params); | 390 | const result = await getDeviceProfileOtaPackages(params); |
| 391 | - return result.data.map((item) => ({ label: item.title, value: item.id.id })); | 391 | + return result.data.map((item) => ({ |
| 392 | + label: `${item.title}(${item.version})`, | ||
| 393 | + value: item.id.id, | ||
| 394 | + })); | ||
| 392 | }, | 395 | }, |
| 393 | params: (textSearch: string) => { | 396 | params: (textSearch: string) => { |
| 394 | return { | 397 | return { |
| @@ -401,7 +404,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -401,7 +404,7 @@ export const step1Schemas: FormSchema[] = [ | ||
| 401 | }, | 404 | }, |
| 402 | queryApi: async (id: string) => { | 405 | queryApi: async (id: string) => { |
| 403 | const result = await getOtaPackageInfo(id); | 406 | const result = await getOtaPackageInfo(id); |
| 404 | - return { label: result.title, value: result.id.id }; | 407 | + return { label: `${result.title}(${result.version})`, value: result.id.id }; |
| 405 | }, | 408 | }, |
| 406 | }; | 409 | }; |
| 407 | }, | 410 | }, |
| @@ -417,7 +420,10 @@ export const step1Schemas: FormSchema[] = [ | @@ -417,7 +420,10 @@ export const step1Schemas: FormSchema[] = [ | ||
| 417 | api: async (params: QueryDeviceProfileOtaPackagesType) => { | 420 | api: async (params: QueryDeviceProfileOtaPackagesType) => { |
| 418 | if (!params.deviceProfileId) return []; | 421 | if (!params.deviceProfileId) return []; |
| 419 | const result = await getDeviceProfileOtaPackages(params); | 422 | const result = await getDeviceProfileOtaPackages(params); |
| 420 | - return result.data.map((item) => ({ label: item.title, value: item.id.id })); | 423 | + return result.data.map((item) => ({ |
| 424 | + label: `${item.title}(${item.version})`, | ||
| 425 | + value: item.id.id, | ||
| 426 | + })); | ||
| 421 | }, | 427 | }, |
| 422 | params: (textSearch: string) => { | 428 | params: (textSearch: string) => { |
| 423 | return { | 429 | return { |
| @@ -430,7 +436,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -430,7 +436,7 @@ export const step1Schemas: FormSchema[] = [ | ||
| 430 | }, | 436 | }, |
| 431 | queryApi: async (id: string) => { | 437 | queryApi: async (id: string) => { |
| 432 | const result = await getOtaPackageInfo(id); | 438 | const result = await getOtaPackageInfo(id); |
| 433 | - return { label: result.title, value: result.id.id }; | 439 | + return { label: `${result.title}(${result.version})`, value: result.id.id }; |
| 434 | }, | 440 | }, |
| 435 | }; | 441 | }; |
| 436 | }, | 442 | }, |
| @@ -332,7 +332,10 @@ export const step1Schemas: FormSchema[] = [ | @@ -332,7 +332,10 @@ export const step1Schemas: FormSchema[] = [ | ||
| 332 | api: async (params: QueryDeviceProfileOtaPackagesType) => { | 332 | api: async (params: QueryDeviceProfileOtaPackagesType) => { |
| 333 | if (!params.deviceProfileId) return []; | 333 | if (!params.deviceProfileId) return []; |
| 334 | const result = await getDeviceProfileOtaPackages(params); | 334 | const result = await getDeviceProfileOtaPackages(params); |
| 335 | - return result.data.map((item) => ({ label: item.title, value: item.id.id })); | 335 | + return result.data.map((item) => ({ |
| 336 | + label: `${item.title}(${item.version})`, | ||
| 337 | + value: item.id.id, | ||
| 338 | + })); | ||
| 336 | }, | 339 | }, |
| 337 | params: (textSearch: string) => { | 340 | params: (textSearch: string) => { |
| 338 | return { | 341 | return { |
| @@ -345,7 +348,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -345,7 +348,7 @@ export const step1Schemas: FormSchema[] = [ | ||
| 345 | }, | 348 | }, |
| 346 | queryApi: async (id: string) => { | 349 | queryApi: async (id: string) => { |
| 347 | const result = await getOtaPackageInfo(id); | 350 | const result = await getOtaPackageInfo(id); |
| 348 | - return { label: result.title, value: result.id.id }; | 351 | + return { label: `${result.title}(${result.version})`, value: result.id.id }; |
| 349 | }, | 352 | }, |
| 350 | }; | 353 | }; |
| 351 | }, | 354 | }, |
| @@ -362,7 +365,10 @@ export const step1Schemas: FormSchema[] = [ | @@ -362,7 +365,10 @@ export const step1Schemas: FormSchema[] = [ | ||
| 362 | api: async (params: QueryDeviceProfileOtaPackagesType) => { | 365 | api: async (params: QueryDeviceProfileOtaPackagesType) => { |
| 363 | if (!params.deviceProfileId) return []; | 366 | if (!params.deviceProfileId) return []; |
| 364 | const result = await getDeviceProfileOtaPackages(params); | 367 | const result = await getDeviceProfileOtaPackages(params); |
| 365 | - return result.data.map((item) => ({ label: item.title, value: item.id.id })); | 368 | + return result.data.map((item) => ({ |
| 369 | + label: `${item.title}(${item.version})`, | ||
| 370 | + value: item.id.id, | ||
| 371 | + })); | ||
| 366 | }, | 372 | }, |
| 367 | params: (textSearch: string) => { | 373 | params: (textSearch: string) => { |
| 368 | return { | 374 | return { |
| @@ -375,7 +381,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -375,7 +381,7 @@ export const step1Schemas: FormSchema[] = [ | ||
| 375 | }, | 381 | }, |
| 376 | queryApi: async (id: string) => { | 382 | queryApi: async (id: string) => { |
| 377 | const result = await getOtaPackageInfo(id); | 383 | const result = await getOtaPackageInfo(id); |
| 378 | - return { label: result.title, value: result.id.id }; | 384 | + return { label: `${result.title}(${result.version})`, value: result.id.id }; |
| 379 | }, | 385 | }, |
| 380 | }; | 386 | }; |
| 381 | }, | 387 | }, |