Commit d83f95768c24c8a15c750191ab70d05b96c44c24

Authored by ww
1 parent e9f6b26d

perf: 设备与产品编辑选择ota升级选项增加版本号

... ... @@ -388,7 +388,10 @@ export const step1Schemas: FormSchema[] = [
388 388 api: async (params: QueryDeviceProfileOtaPackagesType) => {
389 389 if (!params.deviceProfileId) return [];
390 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 396 params: (textSearch: string) => {
394 397 return {
... ... @@ -401,7 +404,7 @@ export const step1Schemas: FormSchema[] = [
401 404 },
402 405 queryApi: async (id: string) => {
403 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 420 api: async (params: QueryDeviceProfileOtaPackagesType) => {
418 421 if (!params.deviceProfileId) return [];
419 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 428 params: (textSearch: string) => {
423 429 return {
... ... @@ -430,7 +436,7 @@ export const step1Schemas: FormSchema[] = [
430 436 },
431 437 queryApi: async (id: string) => {
432 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 332 api: async (params: QueryDeviceProfileOtaPackagesType) => {
333 333 if (!params.deviceProfileId) return [];
334 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 340 params: (textSearch: string) => {
338 341 return {
... ... @@ -345,7 +348,7 @@ export const step1Schemas: FormSchema[] = [
345 348 },
346 349 queryApi: async (id: string) => {
347 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 365 api: async (params: QueryDeviceProfileOtaPackagesType) => {
363 366 if (!params.deviceProfileId) return [];
364 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 373 params: (textSearch: string) => {
368 374 return {
... ... @@ -375,7 +381,7 @@ export const step1Schemas: FormSchema[] = [
375 381 },
376 382 queryApi: async (id: string) => {
377 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 },
... ...