@things-factory/meta-ui 7.1.27 → 7.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/utils/service-util.js +15 -7
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/meta-api.d.ts +1 -1
- package/dist-client/utils/service-util.d.ts +2 -2
- package/dist-client/utils/service-util.js +15 -7
- package/dist-client/utils/service-util.js.map +1 -1
- package/dist-client/utils/ui-util.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -460,9 +460,17 @@ export class ServiceUtil {
|
|
|
460
460
|
column.hidden !== true
|
|
461
461
|
)
|
|
462
462
|
.reduce((record, column) => {
|
|
463
|
-
record[column.imex.key] = column.imex.key
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => {
|
|
464
|
+
const val = obj && obj[key] !== 'undefined' ? obj[key] : undefined
|
|
465
|
+
|
|
466
|
+
if (column.type == 'select') {
|
|
467
|
+
return column?.record?.options?.find(option => option.value == val)?.display
|
|
468
|
+
} else if (column.type.includes('object')) {
|
|
469
|
+
return val?.name
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
return val
|
|
473
|
+
}, item)
|
|
466
474
|
return record
|
|
467
475
|
}, {})
|
|
468
476
|
}
|
|
@@ -488,10 +496,10 @@ export class ServiceUtil {
|
|
|
488
496
|
************************************************
|
|
489
497
|
* @param {String} exportFileName 그리드 내보내기 용 타이틀 (파일명)
|
|
490
498
|
* @param {String} exportQueryName 서버 사이드 GraphQL 쿼리명
|
|
491
|
-
* @param {
|
|
499
|
+
* @param {Object} filterParam 필터용 파라미터
|
|
492
500
|
* @returns {Object} { header: headerSetting, data: data } or Not
|
|
493
501
|
*/
|
|
494
|
-
static async exportableDataByServer(exportFileName, exportQueryName,
|
|
502
|
+
static async exportableDataByServer(exportFileName, exportQueryName, filterParam) {
|
|
495
503
|
// 1. 내보내기 graphQL 요청
|
|
496
504
|
const response = await client.query({
|
|
497
505
|
query: gql`
|
|
@@ -500,7 +508,7 @@ export class ServiceUtil {
|
|
|
500
508
|
}
|
|
501
509
|
`,
|
|
502
510
|
variables: {
|
|
503
|
-
filters:
|
|
511
|
+
filters: filterParam
|
|
504
512
|
}
|
|
505
513
|
})
|
|
506
514
|
|
|
@@ -917,7 +925,7 @@ export class ServiceUtil {
|
|
|
917
925
|
if (action.graphql_type == 'query') {
|
|
918
926
|
return await ServiceUtil.callQueryService(action, filterParam, dataParams)
|
|
919
927
|
} else if (action.graphql_type == 'export') {
|
|
920
|
-
return await ServiceUtil.exportableDataByServer(action.export_file_name, action.query_name,
|
|
928
|
+
return await ServiceUtil.exportableDataByServer(action.export_file_name, action.query_name, filterParam)
|
|
921
929
|
} else {
|
|
922
930
|
return await ServiceUtil.callMutationService(action, filterParam, dataParams)
|
|
923
931
|
}
|