@gingkoo/pandora-metabase 1.0.130 → 1.0.131
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/lib/cjs/components/dialog/expression/index.js +0 -1
- package/lib/cjs/components/dialog/formula-list/utils.js +0 -3
- package/lib/cjs/components/dialog/select-column/index.js +2 -2
- package/lib/cjs/components/dialog/select-column-multiple/index.d.ts +0 -1
- package/lib/cjs/components/dialog/select-column-multiple/index.js +44 -19
- package/lib/cjs/components/dialog/select-join-column/index.js +23 -7
- package/lib/cjs/components/dialog/select-join-column-multiple/index.js +15 -6
- package/lib/cjs/components/dialog/select-permission-table/index.js +2 -2
- package/lib/cjs/components/dialog/select-summarize/index.js +1 -3
- package/lib/cjs/components/dialog/select-table/index.d.ts +1 -2
- package/lib/cjs/components/dialog/select-table/index.js +231 -261
- package/lib/cjs/components/dialog/select-table/index.less +51 -36
- package/lib/cjs/components/metabase/index.js +34 -16
- package/lib/cjs/components/modules/components/item-name.js +0 -1
- package/lib/cjs/components/modules/custom-column.js +3 -7
- package/lib/cjs/components/modules/filter.js +3 -6
- package/lib/cjs/components/modules/join-data.js +41 -87
- package/lib/cjs/components/modules/permission-table.js +5 -9
- package/lib/cjs/components/modules/sort.js +1 -2
- package/lib/cjs/components/modules/summarize/group-by.js +1 -8
- package/lib/cjs/components/modules/summarize/select-index.js +1 -4
- package/lib/cjs/components/modules/table-data.js +28 -44
- package/lib/cjs/hooks/use-state.js +22 -147
- package/lib/cjs/index.js +1 -7
- package/lib/cjs/locale/en.js +1 -0
- package/lib/cjs/locale/zh.js +1 -0
- package/lib/cjs/store/types.d.ts +4 -5
- package/lib/cjs/types.d.ts +0 -8
- package/lib/cjs/utils/helper.d.ts +4 -0
- package/lib/cjs/utils/helper.js +102 -1
- package/lib/cjs/utils/transformSql.js +0 -2
- package/lib/cjs/utils.js +38 -18
- package/lib/es/components/dialog/expression/index.js +0 -1
- package/lib/es/components/dialog/formula-list/utils.js +0 -3
- package/lib/es/components/dialog/select-column/index.js +3 -3
- package/lib/es/components/dialog/select-column-multiple/index.d.ts +0 -1
- package/lib/es/components/dialog/select-column-multiple/index.js +45 -21
- package/lib/es/components/dialog/select-join-column/index.js +24 -8
- package/lib/es/components/dialog/select-join-column-multiple/index.js +16 -7
- package/lib/es/components/dialog/select-permission-table/index.js +3 -3
- package/lib/es/components/dialog/select-summarize/index.js +1 -3
- package/lib/es/components/dialog/select-table/index.d.ts +1 -2
- package/lib/es/components/dialog/select-table/index.js +233 -263
- package/lib/es/components/dialog/select-table/index.less +51 -36
- package/lib/es/components/metabase/index.js +34 -16
- package/lib/es/components/modules/components/item-name.js +0 -1
- package/lib/es/components/modules/custom-column.js +3 -7
- package/lib/es/components/modules/filter.js +3 -6
- package/lib/es/components/modules/join-data.js +42 -88
- package/lib/es/components/modules/permission-table.js +6 -10
- package/lib/es/components/modules/sort.js +1 -2
- package/lib/es/components/modules/summarize/group-by.js +1 -8
- package/lib/es/components/modules/summarize/select-index.js +1 -4
- package/lib/es/components/modules/table-data.js +29 -45
- package/lib/es/hooks/use-state.js +23 -148
- package/lib/es/index.js +1 -7
- package/lib/es/locale/en.js +1 -0
- package/lib/es/locale/zh.js +1 -0
- package/lib/es/store/types.d.ts +4 -5
- package/lib/es/types.d.ts +0 -8
- package/lib/es/utils/helper.d.ts +4 -0
- package/lib/es/utils/helper.js +101 -0
- package/lib/es/utils/transformSql.js +0 -2
- package/lib/es/utils.js +39 -19
- package/package.json +1 -1
package/lib/cjs/utils/helper.js
CHANGED
|
@@ -4,9 +4,110 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.uuidv4 = exports.throttle = exports.sleep = exports.replaceTpl = exports.mobx2Object = exports.mergeNameAlias = exports.getUrlParams = exports.getScreenInfo = exports.getAlias = exports.fullScreen = exports.flatArray = exports.exitFullscreen = exports.debounce = void 0;
|
|
7
|
+
exports.uuidv4 = exports.throttle = exports.sleep = exports.replaceTpl = exports.mobx2Object = exports.mergeNameAlias = exports.isSameTableByIdFirst = exports.isSameColumnByIdFirst = exports.getUrlParams = exports.getTableIdFirstKey = exports.getScreenInfo = exports.getColumnIdFirstKey = exports.getAlias = exports.fullScreen = exports.flatArray = exports.exitFullscreen = exports.debounce = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
9
|
var _enum = require("../store/enum");
|
|
10
|
+
var normalizeId = function normalizeId(val) {
|
|
11
|
+
if (val === undefined || val === null) return '';
|
|
12
|
+
return "".concat(val);
|
|
13
|
+
};
|
|
14
|
+
var hasBoth = function hasBoth(left, right) {
|
|
15
|
+
return Boolean(left && right);
|
|
16
|
+
};
|
|
17
|
+
var getTableIdFirstKey = exports.getTableIdFirstKey = function getTableIdFirstKey() {
|
|
18
|
+
var table = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
|
+
var datasourceId = normalizeId(table.datasourceId);
|
|
20
|
+
var tableId = normalizeId(table.id || table.tableId);
|
|
21
|
+
if (tableId) return "".concat(datasourceId, "|id:").concat(tableId);
|
|
22
|
+
var tableUuid = normalizeId(table.tableUuid);
|
|
23
|
+
if (tableUuid) return "".concat(datasourceId, "|uuid:").concat(tableUuid);
|
|
24
|
+
var tableName = normalizeId(table.name || table.tableName);
|
|
25
|
+
var tableAlias = normalizeId(table.alias || table.tableAlias);
|
|
26
|
+
return tableName ? "".concat(datasourceId, "|name:").concat(tableName, "|alias:").concat(tableAlias) : datasourceId;
|
|
27
|
+
};
|
|
28
|
+
var isSameTableByIdFirst = exports.isSameTableByIdFirst = function isSameTableByIdFirst() {
|
|
29
|
+
var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
30
|
+
var right = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
31
|
+
var leftDatasourceId = normalizeId(left.datasourceId);
|
|
32
|
+
var rightDatasourceId = normalizeId(right.datasourceId);
|
|
33
|
+
if (hasBoth(leftDatasourceId, rightDatasourceId) && leftDatasourceId !== rightDatasourceId) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
var leftTableId = normalizeId(left.id || left.tableId);
|
|
37
|
+
var rightTableId = normalizeId(right.id || right.tableId);
|
|
38
|
+
if (hasBoth(leftTableId, rightTableId)) {
|
|
39
|
+
return leftTableId === rightTableId;
|
|
40
|
+
}
|
|
41
|
+
var leftTableName = normalizeId(left.name || left.tableName);
|
|
42
|
+
var rightTableName = normalizeId(right.name || right.tableName);
|
|
43
|
+
if (hasBoth(leftTableName, rightTableName)) {
|
|
44
|
+
if (leftTableName !== rightTableName) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
var leftTableAlias = normalizeId(left.alias || left.tableAlias);
|
|
48
|
+
var rightTableAlias = normalizeId(right.alias || right.tableAlias);
|
|
49
|
+
if (hasBoth(leftTableAlias, rightTableAlias)) {
|
|
50
|
+
return leftTableAlias === rightTableAlias;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
var leftTableUuid = normalizeId(left.tableUuid);
|
|
55
|
+
var rightTableUuid = normalizeId(right.tableUuid);
|
|
56
|
+
if (hasBoth(leftTableUuid, rightTableUuid)) {
|
|
57
|
+
return leftTableUuid === rightTableUuid;
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
var getColumnIdFirstKey = exports.getColumnIdFirstKey = function getColumnIdFirstKey() {
|
|
62
|
+
var column = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
63
|
+
var tableKey = getTableIdFirstKey(column);
|
|
64
|
+
var fieldId = normalizeId(column.fieldId || column.id);
|
|
65
|
+
if (fieldId) return "".concat(tableKey, "|fieldId:").concat(fieldId);
|
|
66
|
+
var fieldUuid = normalizeId(column.fieldUuid);
|
|
67
|
+
if (fieldUuid) return "".concat(tableKey, "|fieldUuid:").concat(fieldUuid);
|
|
68
|
+
var fieldName = normalizeId(column.fieldName || column.name);
|
|
69
|
+
var fieldAlias = normalizeId(column.fieldAlias);
|
|
70
|
+
return fieldName ? "".concat(tableKey, "|fieldName:").concat(fieldName, "|alias:").concat(fieldAlias) : tableKey;
|
|
71
|
+
};
|
|
72
|
+
var isSameColumnByIdFirst = exports.isSameColumnByIdFirst = function isSameColumnByIdFirst() {
|
|
73
|
+
var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
74
|
+
var right = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
75
|
+
var leftDatasourceId = normalizeId(left.datasourceId);
|
|
76
|
+
var rightDatasourceId = normalizeId(right.datasourceId);
|
|
77
|
+
if (hasBoth(leftDatasourceId, rightDatasourceId) && leftDatasourceId !== rightDatasourceId) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
var leftTableId = normalizeId(left.tableId);
|
|
81
|
+
var rightTableId = normalizeId(right.tableId);
|
|
82
|
+
if (hasBoth(leftTableId, rightTableId) && leftTableId !== rightTableId) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
var leftTableUuid = normalizeId(left.tableUuid);
|
|
86
|
+
var rightTableUuid = normalizeId(right.tableUuid);
|
|
87
|
+
if (hasBoth(leftTableUuid, rightTableUuid) && leftTableUuid !== rightTableUuid) {
|
|
88
|
+
var leftTableName = normalizeId(left.tableName || left.table);
|
|
89
|
+
var rightTableName = normalizeId(right.tableName || right.table);
|
|
90
|
+
if (!hasBoth(leftTableName, rightTableName) || leftTableName !== rightTableName) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
var leftFieldId = normalizeId(left.fieldId || left.id);
|
|
95
|
+
var rightFieldId = normalizeId(right.fieldId || right.id);
|
|
96
|
+
if (hasBoth(leftFieldId, rightFieldId)) {
|
|
97
|
+
return leftFieldId === rightFieldId;
|
|
98
|
+
}
|
|
99
|
+
var leftFieldUuid = normalizeId(left.fieldUuid);
|
|
100
|
+
var rightFieldUuid = normalizeId(right.fieldUuid);
|
|
101
|
+
if (hasBoth(leftFieldUuid, rightFieldUuid)) {
|
|
102
|
+
return leftFieldUuid === rightFieldUuid;
|
|
103
|
+
}
|
|
104
|
+
var leftFieldName = normalizeId(left.fieldName || left.name);
|
|
105
|
+
var rightFieldName = normalizeId(right.fieldName || right.name);
|
|
106
|
+
if (hasBoth(leftFieldName, rightFieldName)) {
|
|
107
|
+
return leftFieldName === rightFieldName;
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
};
|
|
10
111
|
var throttle = exports.throttle = function throttle(fn) {
|
|
11
112
|
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
12
113
|
if (typeof fn !== 'function') return function () {
|
|
@@ -525,7 +525,6 @@ var _handleJoinData = function _handleJoinData(joinData) {
|
|
|
525
525
|
tableName_zh: v.table2.name_zh,
|
|
526
526
|
datasourceId: v.table2.datasourceId || '',
|
|
527
527
|
datasourceName: v.table2.datasourceName || '',
|
|
528
|
-
datasourceType: v.table2.datasourceType || '',
|
|
529
528
|
joinCondition: joinCondition,
|
|
530
529
|
joinType: v.joinType,
|
|
531
530
|
subQuery: subQuery,
|
|
@@ -569,7 +568,6 @@ var _handleNesting = function handleNesting(data) {
|
|
|
569
568
|
obj.tableId = tableData.table.id;
|
|
570
569
|
obj.datasourceId = tableData.table.datasourceId;
|
|
571
570
|
obj.datasourceName = tableData.table.datasourceName;
|
|
572
|
-
obj.datasourceType = tableData.table.datasourceType;
|
|
573
571
|
if (tableData.isSubquery && Array.isArray(tableData.subquery)) {
|
|
574
572
|
obj.tableSubQuery = tableData.subquery;
|
|
575
573
|
}
|
package/lib/cjs/utils.js
CHANGED
|
@@ -144,7 +144,7 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
144
144
|
_data.columns = _data.columns.concat(prevGroupBy.group.map(function (v) {
|
|
145
145
|
var _v$sql;
|
|
146
146
|
return (0, _objectSpread6["default"])((0, _objectSpread6["default"])({}, v), {}, {
|
|
147
|
-
name: v.
|
|
147
|
+
name: v.name || v.quotes,
|
|
148
148
|
name_zh: v.name_zh || v.quotes,
|
|
149
149
|
id: v.id || v.fieldId,
|
|
150
150
|
realName: ((_v$sql = v.sql) === null || _v$sql === void 0 || (_v$sql = _v$sql.split(' AS ')) === null || _v$sql === void 0 ? void 0 : _v$sql[1]) || '',
|
|
@@ -158,7 +158,7 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
158
158
|
_data.columns = _data.columns.concat(prevGroupBy.by.map(function (v) {
|
|
159
159
|
var _v$sql2;
|
|
160
160
|
return (0, _objectSpread6["default"])((0, _objectSpread6["default"])({}, v), {}, {
|
|
161
|
-
name: v.
|
|
161
|
+
name: v.name || v.quotes,
|
|
162
162
|
name_zh: v.name_zh || v.quotes,
|
|
163
163
|
id: v.id || v.fieldId,
|
|
164
164
|
realName: ((_v$sql2 = v.sql) === null || _v$sql2 === void 0 || (_v$sql2 = _v$sql2.split(' AS ')) === null || _v$sql2 === void 0 ? void 0 : _v$sql2[1]) || '',
|
|
@@ -184,7 +184,11 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
184
184
|
});
|
|
185
185
|
return {
|
|
186
186
|
alias: v.table2.alias,
|
|
187
|
-
|
|
187
|
+
name: v.table2.name,
|
|
188
|
+
id: v.table2.id,
|
|
189
|
+
tableUuid: v.table2.tableUuid,
|
|
190
|
+
datasourceId: v.table2.datasourceId,
|
|
191
|
+
datasourceName: v.table2.datasourceName,
|
|
188
192
|
columns: columns
|
|
189
193
|
};
|
|
190
194
|
}));
|
|
@@ -202,7 +206,11 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
202
206
|
});
|
|
203
207
|
return {
|
|
204
208
|
alias: v.table.alias,
|
|
205
|
-
|
|
209
|
+
name: v.table.name,
|
|
210
|
+
id: v.table.id,
|
|
211
|
+
tableUuid: v.table.tableUuid,
|
|
212
|
+
datasourceId: v.table.datasourceId,
|
|
213
|
+
datasourceName: v.table.datasourceName,
|
|
206
214
|
columns: columns
|
|
207
215
|
};
|
|
208
216
|
} else if (v.type === _enum.TypeEnum.joinData) {
|
|
@@ -216,7 +224,11 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
216
224
|
});
|
|
217
225
|
return {
|
|
218
226
|
alias: v.table2.alias,
|
|
219
|
-
|
|
227
|
+
name: v.table2.name,
|
|
228
|
+
id: v.table2.id,
|
|
229
|
+
tableUuid: v.table2.tableUuid,
|
|
230
|
+
datasourceId: v.table2.datasourceId,
|
|
231
|
+
datasourceName: v.table2.datasourceName,
|
|
220
232
|
columns: _columns
|
|
221
233
|
};
|
|
222
234
|
} else if (v.type === _enum.TypeEnum.customColumn) {
|
|
@@ -235,7 +247,8 @@ var getSubColumns = exports.getSubColumns = function getSubColumns(metaList) {
|
|
|
235
247
|
return {
|
|
236
248
|
columns: _columns2,
|
|
237
249
|
alias: '',
|
|
238
|
-
|
|
250
|
+
name: (0, _locale.__)('SqlQueryBuilder.customColumn'),
|
|
251
|
+
id: (0, _locale.__)('SqlQueryBuilder.customColumn')
|
|
239
252
|
};
|
|
240
253
|
} else {
|
|
241
254
|
return {
|
|
@@ -821,8 +834,7 @@ var stripSummarizeTableFields = function stripSummarizeTableFields(record) {
|
|
|
821
834
|
tableUuid: '',
|
|
822
835
|
alias: '',
|
|
823
836
|
datasourceId: '',
|
|
824
|
-
datasourceName: ''
|
|
825
|
-
datasourceType: ''
|
|
837
|
+
datasourceName: ''
|
|
826
838
|
});
|
|
827
839
|
};
|
|
828
840
|
var createSummarizeFieldAtom = function createSummarizeFieldAtom(record) {
|
|
@@ -840,7 +852,6 @@ var createSummarizeFieldAtom = function createSummarizeFieldAtom(record) {
|
|
|
840
852
|
tableUuid: record.tableUuid || '',
|
|
841
853
|
datasourceName: record.datasourceName || '',
|
|
842
854
|
datasourceId: record.datasourceId || '',
|
|
843
|
-
datasourceType: record.datasourceType || '',
|
|
844
855
|
type: _types.AtomsTypeEnum.FIELD
|
|
845
856
|
};
|
|
846
857
|
};
|
|
@@ -998,17 +1009,21 @@ var _isError = exports.isError = function isError(item, data) {
|
|
|
998
1009
|
return true;
|
|
999
1010
|
} else {
|
|
1000
1011
|
var _tables$_datasourceId2;
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1012
|
+
var fields = (tables === null || tables === void 0 || (_tables$_datasourceId2 = tables[_datasourceId]) === null || _tables$_datasourceId2 === void 0 ? void 0 : _tables$_datasourceId2[tableId + tableAlias]) || [];
|
|
1013
|
+
return fields.every(function (field) {
|
|
1014
|
+
return !(0, _helper2.isSameColumnByIdFirst)((0, _objectSpread6["default"])((0, _objectSpread6["default"])({}, field), {}, {
|
|
1015
|
+
datasourceId: _datasourceId,
|
|
1016
|
+
tableId: tableId
|
|
1017
|
+
}), item);
|
|
1006
1018
|
});
|
|
1007
1019
|
}
|
|
1008
1020
|
} else {
|
|
1009
1021
|
var _tables$_datasourceId3, _tables$_datasourceId4;
|
|
1010
1022
|
var hasField = (_tables$_datasourceId3 = tables === null || tables === void 0 || (_tables$_datasourceId4 = tables[_datasourceId]) === null || _tables$_datasourceId4 === void 0 || (_tables$_datasourceId4 = _tables$_datasourceId4[tableId + tableAlias]) === null || _tables$_datasourceId4 === void 0 ? void 0 : _tables$_datasourceId4.some(function (v) {
|
|
1011
|
-
return
|
|
1023
|
+
return (0, _helper2.isSameColumnByIdFirst)((0, _objectSpread6["default"])((0, _objectSpread6["default"])({}, v), {}, {
|
|
1024
|
+
datasourceId: _datasourceId,
|
|
1025
|
+
tableId: tableId
|
|
1026
|
+
}), item);
|
|
1012
1027
|
})) !== null && _tables$_datasourceId3 !== void 0 ? _tables$_datasourceId3 : false;
|
|
1013
1028
|
return !hasField;
|
|
1014
1029
|
}
|
|
@@ -1096,19 +1111,24 @@ function setNewField(field, data) {
|
|
|
1096
1111
|
try {
|
|
1097
1112
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1098
1113
|
var table = _step3.value;
|
|
1099
|
-
if (
|
|
1114
|
+
if (!(0, _helper2.isSameTableByIdFirst)(table, {
|
|
1115
|
+
datasourceId: field.datasourceId,
|
|
1116
|
+
id: field.tableId,
|
|
1117
|
+
name: field.tableName,
|
|
1118
|
+
alias: field.tableAlias,
|
|
1119
|
+
tableUuid: field.tableUuid
|
|
1120
|
+
})) {
|
|
1100
1121
|
continue;
|
|
1101
1122
|
}
|
|
1102
1123
|
field.datasourceId = table.datasourceId || '';
|
|
1103
1124
|
field.datasourceName = table.datasourceName || '';
|
|
1104
|
-
field.datasourceType = table.datasourceType || '';
|
|
1105
1125
|
field.tableId = table.id || '';
|
|
1106
1126
|
field.tableName = table.name || '';
|
|
1107
1127
|
field.tableAlias = table.alias || '';
|
|
1108
1128
|
field.tableUuid = table.tableUuid || '';
|
|
1109
1129
|
field.tableNameZh = table.name_zh || '';
|
|
1110
1130
|
var matchedColumn = table.columns.find(function (col) {
|
|
1111
|
-
return col
|
|
1131
|
+
return (0, _helper2.isSameColumnByIdFirst)(col, field);
|
|
1112
1132
|
});
|
|
1113
1133
|
if (matchedColumn) {
|
|
1114
1134
|
field.fieldId = matchedColumn.id || '';
|
|
@@ -67,7 +67,6 @@ export var insertTemplateAt = function insertTemplateAt(oldType, type, list, ind
|
|
|
67
67
|
tableUuid: '',
|
|
68
68
|
datasourceName: '',
|
|
69
69
|
datasourceId: '',
|
|
70
|
-
datasourceType: '',
|
|
71
70
|
type: AtomsTypeEnum.FIELD
|
|
72
71
|
}, {
|
|
73
72
|
val: 'ORDER BY',
|
|
@@ -85,7 +84,6 @@ export var insertTemplateAt = function insertTemplateAt(oldType, type, list, ind
|
|
|
85
84
|
tableUuid: '',
|
|
86
85
|
datasourceName: '',
|
|
87
86
|
datasourceId: '',
|
|
88
|
-
datasourceType: '',
|
|
89
87
|
type: AtomsTypeEnum.FIELD
|
|
90
88
|
}, {
|
|
91
89
|
val: ')',
|
|
@@ -145,7 +143,6 @@ export var getTemplateItem = function getTemplateItem(type, item) {
|
|
|
145
143
|
tableUuid: '',
|
|
146
144
|
datasourceName: '',
|
|
147
145
|
datasourceId: '',
|
|
148
|
-
datasourceType: '',
|
|
149
146
|
type: AtomsTypeEnum.FIELD
|
|
150
147
|
};
|
|
151
148
|
} else if (type === AtomsTypeEnum.EXPRESSION || type === AtomsTypeEnum.JOIN_DEFAULT) {
|
|
@@ -12,7 +12,7 @@ import { ChangeType } from '../../../store/types';
|
|
|
12
12
|
import { __ } from '../../../locale';
|
|
13
13
|
import { NotSelectIcon, SelectIcon } from '../../icons';
|
|
14
14
|
import { useStore } from '../../../hooks/use-provider';
|
|
15
|
-
import { uuidv4 } from '../../../utils/helper';
|
|
15
|
+
import { getColumnIdFirstKey, isSameColumnByIdFirst, uuidv4 } from '../../../utils/helper';
|
|
16
16
|
import { changeFieldAlias, isValidSQLAlias } from '../../../utils';
|
|
17
17
|
import { SearchIcon } from '../../icons';
|
|
18
18
|
var SelectColumn = function SelectColumn(_ref) {
|
|
@@ -73,7 +73,7 @@ var SelectColumn = function SelectColumn(_ref) {
|
|
|
73
73
|
var originalData = cloneDeep(originList);
|
|
74
74
|
var mergedColumns = originalData.map(function (item) {
|
|
75
75
|
var match = columns.find(function (col) {
|
|
76
|
-
return col
|
|
76
|
+
return isSameColumnByIdFirst(col, item);
|
|
77
77
|
});
|
|
78
78
|
return match ? cloneDeep(match) : item;
|
|
79
79
|
});
|
|
@@ -197,7 +197,7 @@ var SelectColumn = function SelectColumn(_ref) {
|
|
|
197
197
|
}
|
|
198
198
|
})
|
|
199
199
|
})]
|
|
200
|
-
}, v
|
|
200
|
+
}, getColumnIdFirstKey(v));
|
|
201
201
|
})
|
|
202
202
|
})]
|
|
203
203
|
})
|
|
@@ -13,8 +13,7 @@ import { AtomsTypeEnum } from '../../../store/types';
|
|
|
13
13
|
import { __ } from '../../../locale';
|
|
14
14
|
import { NUMBER_GROUP, DATE_GROUP } from '../const';
|
|
15
15
|
import { useStore } from '../../../hooks/use-provider';
|
|
16
|
-
import { replaceTpl, mergeNameAlias } from '../../../utils/helper';
|
|
17
|
-
import { uuidv4 } from '../../../utils/helper';
|
|
16
|
+
import { isSameColumnByIdFirst, replaceTpl, mergeNameAlias, uuidv4 } from '../../../utils/helper';
|
|
18
17
|
import { SearchIcon, TableIcon, CircleIcon, LetterAaIcon, CalendarIcon, WellIcon, ForeignKeyIcon, UpArrowIcon2, DownArrowIcon2 } from '../../icons';
|
|
19
18
|
export var DATE_GROUP_MAP = new Map([['分', '分'], ['时', '时'], ['天', '天'], ['周', '周'], ['月', '月'], ['季度', '季度'], ['一小时内的分钟数', '一小时内的分钟数'], ['一天内的小时数', '一天内的小时数'], ['一周内的天数', '一周内的天数'], ['一月内的天数', '一月内的天数'], ['一年内的天数', '一年内的天数'], ['一年的星期数', '一年的星期数'], ['一年的月数', '一年的月数']]);
|
|
20
19
|
export var NUMBER_GROUP_MAP = new Map([['自动间隔', '自动分组'], ['10个刻度间隔', '10 刻度间隔'], ['间隔50', '50 刻度间隔'], ['间隔100', '100 刻度间隔'], ['无间隔', '']]);
|
|
@@ -80,22 +79,34 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
80
79
|
useEffect(function () {
|
|
81
80
|
setValue(_value);
|
|
82
81
|
}, [_value]);
|
|
82
|
+
var getFieldTableKey = function getFieldTableKey(tableId, tableUuid) {
|
|
83
|
+
return tableId || tableUuid || '';
|
|
84
|
+
};
|
|
85
|
+
var isSameSelectedTable = function isSameSelectedTable(field, tableId, tableUuid) {
|
|
86
|
+
if (field.tableId && tableId) {
|
|
87
|
+
return field.tableId === tableId;
|
|
88
|
+
}
|
|
89
|
+
if (field.tableUuid && tableUuid) {
|
|
90
|
+
return field.tableUuid === tableUuid;
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
};
|
|
83
94
|
var getSelectedFieldKey = function getSelectedFieldKey(field) {
|
|
84
95
|
if (!field) return '';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return "".concat(field.fieldId).concat(field.fieldAlias || '');
|
|
96
|
+
var tableKey = getFieldTableKey(field.tableId, field.tableUuid);
|
|
97
|
+
var fieldKey = field.tableId === SummarizeAlias ? field.fieldAlias || '' : "".concat(field.fieldId).concat(field.fieldAlias || '');
|
|
98
|
+
return "".concat(tableKey, "|").concat(fieldKey);
|
|
89
99
|
};
|
|
90
|
-
var getColumnKey = function getColumnKey(column, isSummarizeColumn) {
|
|
100
|
+
var getColumnKey = function getColumnKey(column, isSummarizeColumn, tableId, tableUuid) {
|
|
101
|
+
var tableKey = getFieldTableKey(tableId, tableUuid);
|
|
91
102
|
if (isSummarizeColumn) {
|
|
92
|
-
return column.fieldAlias || column.name || '';
|
|
103
|
+
return "".concat(tableKey, "|").concat(column.fieldAlias || column.name || '');
|
|
93
104
|
}
|
|
94
|
-
return "".concat(column.id || column.name).concat(column.fieldAlias || '');
|
|
105
|
+
return "".concat(tableKey, "|").concat(column.id || column.name).concat(column.fieldAlias || '');
|
|
95
106
|
};
|
|
96
|
-
var isActive = function isActive(id_alias) {
|
|
107
|
+
var isActive = function isActive(id_alias, tableId, tableUuid) {
|
|
97
108
|
return (value === null || value === void 0 ? void 0 : value.filter(function (v) {
|
|
98
|
-
return getSelectedFieldKey(v) === id_alias;
|
|
109
|
+
return isSameSelectedTable(v, tableId, tableUuid) && getSelectedFieldKey(v) === id_alias;
|
|
99
110
|
}).length) > 0;
|
|
100
111
|
};
|
|
101
112
|
useEffect(function () {
|
|
@@ -149,30 +160,39 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
149
160
|
}
|
|
150
161
|
var selectedKey = getSelectedFieldKey(val);
|
|
151
162
|
var isHas = (value === null || value === void 0 ? void 0 : value.filter(function (v) {
|
|
152
|
-
return getSelectedFieldKey(v) === selectedKey;
|
|
163
|
+
return val && isSameSelectedTable(v, val.tableId, val.tableUuid) && getSelectedFieldKey(v) === selectedKey;
|
|
153
164
|
}).length) > 0;
|
|
154
165
|
var _value = value.slice();
|
|
155
166
|
if (tableUuid != curTable) {
|
|
156
167
|
_value = [];
|
|
157
168
|
}
|
|
158
169
|
if (!isHas && val) {
|
|
170
|
+
_value = _value.filter(function (v) {
|
|
171
|
+
var hasTableKey = getFieldTableKey(v.tableId, v.tableUuid);
|
|
172
|
+
var isLegacySameField = !hasTableKey && (v.fieldId && v.fieldId === val.fieldId || v.fieldName && v.fieldName === val.fieldName);
|
|
173
|
+
return !isLegacySameField;
|
|
174
|
+
});
|
|
159
175
|
_value.push(val);
|
|
160
176
|
} else {
|
|
161
177
|
_value = _value.filter(function (v) {
|
|
162
|
-
return getSelectedFieldKey(v)
|
|
178
|
+
return !(val && isSameSelectedTable(v, val.tableId, val.tableUuid) && getSelectedFieldKey(v) === selectedKey);
|
|
163
179
|
});
|
|
164
180
|
}
|
|
165
|
-
var
|
|
181
|
+
var curTableItem = data.find(function (v) {
|
|
166
182
|
return v.tableUuid === tableUuid;
|
|
167
|
-
}).flatMap(function (v) {
|
|
168
|
-
return v.columns;
|
|
169
183
|
});
|
|
184
|
+
var curTableId = (curTableItem === null || curTableItem === void 0 ? void 0 : curTableItem.id) || '';
|
|
185
|
+
var curTableColumn = (curTableItem === null || curTableItem === void 0 ? void 0 : curTableItem.columns) || [];
|
|
170
186
|
_value = _value.filter(function (item2) {
|
|
171
|
-
return curTableColumn.some(function (item1) {
|
|
187
|
+
return isSameSelectedTable(item2, curTableId, tableUuid) && curTableColumn.some(function (item1) {
|
|
172
188
|
if (item2.tableId === SummarizeAlias) {
|
|
173
189
|
return (item1.fieldAlias || item1.name) === item2.fieldAlias;
|
|
174
190
|
}
|
|
175
|
-
return item1
|
|
191
|
+
return isSameColumnByIdFirst(_objectSpread(_objectSpread({}, item1), {}, {
|
|
192
|
+
tableId: curTableId,
|
|
193
|
+
tableUuid: tableUuid,
|
|
194
|
+
datasourceId: (curTableItem === null || curTableItem === void 0 ? void 0 : curTableItem.datasourceId) || ''
|
|
195
|
+
}), item2);
|
|
176
196
|
});
|
|
177
197
|
});
|
|
178
198
|
setValue(_value);
|
|
@@ -261,6 +281,11 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
261
281
|
if (isGroup) {
|
|
262
282
|
changeValue(tableUuid);
|
|
263
283
|
}
|
|
284
|
+
if (tableUuid !== curTable) {
|
|
285
|
+
setCurTable(tableUuid);
|
|
286
|
+
setValue([]);
|
|
287
|
+
onSelect === null || onSelect === void 0 || onSelect([], '');
|
|
288
|
+
}
|
|
264
289
|
if (!isMultiple) return void 0;
|
|
265
290
|
var newTables = cloneDeep(tableList);
|
|
266
291
|
if (open) {
|
|
@@ -321,7 +346,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
321
346
|
_v$database_type = v.database_type,
|
|
322
347
|
database_type = _v$database_type === void 0 ? '' : _v$database_type,
|
|
323
348
|
name = v.name;
|
|
324
|
-
var columnKey = getColumnKey(v, isSummarize);
|
|
349
|
+
var columnKey = getColumnKey(v, isSummarize, tableId || '', tableUuid);
|
|
325
350
|
var fieldAlias = isSummarize ? v.fieldAlias || name || '' : v.fieldAlias || '';
|
|
326
351
|
var fieldName = isSummarize ? '' : name || '';
|
|
327
352
|
var fieldId = isSummarize ? '' : v.id || name || '';
|
|
@@ -337,7 +362,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
337
362
|
className: cx("Sqb-List-section"),
|
|
338
363
|
children: _jsx("div", {
|
|
339
364
|
className: cx("Sqb-List-item mx-2", {
|
|
340
|
-
active: isActive(columnKey)
|
|
365
|
+
active: isActive(columnKey, tableId || '', tableUuid)
|
|
341
366
|
}),
|
|
342
367
|
onClick: function onClick() {
|
|
343
368
|
changeValue(tableUuid, {
|
|
@@ -348,7 +373,6 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
348
373
|
tableUuid: tableItem.tableUuid || '',
|
|
349
374
|
datasourceName: tableItem.datasourceName || '',
|
|
350
375
|
datasourceId: tableItem.datasourceId || '',
|
|
351
|
-
datasourceType: tableItem.datasourceType || '',
|
|
352
376
|
fieldName: fieldName,
|
|
353
377
|
fieldId: fieldId,
|
|
354
378
|
fieldNameZh: fieldNameZh,
|
|
@@ -11,7 +11,7 @@ import { SummarizeAlias } from '../../../store/helper';
|
|
|
11
11
|
import { __ } from '../../../locale';
|
|
12
12
|
import { NUMBER_GROUP, DATE_GROUP } from '../const';
|
|
13
13
|
import { useStore } from '../../../hooks/use-provider';
|
|
14
|
-
import { replaceTpl, mergeNameAlias } from '../../../utils/helper';
|
|
14
|
+
import { getColumnIdFirstKey, isSameColumnByIdFirst, replaceTpl, mergeNameAlias } from '../../../utils/helper';
|
|
15
15
|
import { SearchIcon, TableIcon, CircleIcon, LetterAaIcon, CalendarIcon, WellIcon, ForeignKeyIcon, UpArrowIcon2, DownArrowIcon2, RightArrowIcon } from '../../icons';
|
|
16
16
|
export var DATE_GROUP_MAP = new Map([['分', '分'], ['时', '时'], ['天', '天'], ['周', '周'], ['月', '月'], ['季度', '季度'], ['一小时内的分钟数', '一小时内的分钟数'], ['一天内的小时数', '一天内的小时数'], ['一周内的天数', '一周内的天数'], ['一月内的天数', '一月内的天数'], ['一年内的天数', '一年内的天数'], ['一年的星期数', '一年的星期数'], ['一年的月数', '一年的月数']]);
|
|
17
17
|
export var NUMBER_GROUP_MAP = new Map([['自动间隔', '自动分组'], ['10个刻度间隔', '10 刻度间隔'], ['间隔50', '50 刻度间隔'], ['间隔100', '100 刻度间隔'], ['无间隔', '']]);
|
|
@@ -49,7 +49,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
49
49
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
50
|
curTable = _useState4[0],
|
|
51
51
|
setCurTable = _useState4[1];
|
|
52
|
-
var _useState5 = useState(_value
|
|
52
|
+
var _useState5 = useState(_value),
|
|
53
53
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
54
54
|
curColumn = _useState6[0],
|
|
55
55
|
setCurColumn = _useState6[1];
|
|
@@ -70,7 +70,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
70
70
|
setTableList = _useState0[1];
|
|
71
71
|
useEffect(function () {
|
|
72
72
|
setValue(_value);
|
|
73
|
-
setCurColumn(_value
|
|
73
|
+
setCurColumn(_value);
|
|
74
74
|
}, [_value]);
|
|
75
75
|
useEffect(function () {
|
|
76
76
|
var tableUuid = _value === null || _value === void 0 ? void 0 : _value.tableUuid;
|
|
@@ -244,12 +244,20 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
244
244
|
if (~DATE_GROUP.indexOf(database_type)) {
|
|
245
245
|
groupe = SQL_GROUP_TYPE.DATE;
|
|
246
246
|
}
|
|
247
|
-
var showCondition = curColumn
|
|
247
|
+
var showCondition = isSameColumnByIdFirst(curColumn, _objectSpread(_objectSpread({}, v), {}, {
|
|
248
|
+
tableId: tableId,
|
|
249
|
+
tableUuid: tableUuid,
|
|
250
|
+
datasourceId: datasourceId
|
|
251
|
+
})) && curTable === tableUuid && _condition;
|
|
248
252
|
return _jsx("div", {
|
|
249
253
|
className: cx("Sqb-List-section"),
|
|
250
254
|
children: _jsxs("div", {
|
|
251
255
|
className: cx("Sqb-List-item mx-2", {
|
|
252
|
-
active:
|
|
256
|
+
active: curTable === tableUuid && isSameColumnByIdFirst(value, _objectSpread(_objectSpread({}, v), {}, {
|
|
257
|
+
tableId: tableId,
|
|
258
|
+
tableUuid: tableUuid,
|
|
259
|
+
datasourceId: datasourceId
|
|
260
|
+
}))
|
|
253
261
|
}),
|
|
254
262
|
onClick: function onClick() {
|
|
255
263
|
if (isGroup && typeof onGroup === 'function') {
|
|
@@ -311,11 +319,15 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
311
319
|
onVisibleChange: function onVisibleChange(visible) {
|
|
312
320
|
if (visible) {
|
|
313
321
|
setCurTable(tableUuid);
|
|
314
|
-
setCurColumn(
|
|
322
|
+
setCurColumn(_objectSpread(_objectSpread(_objectSpread({}, value), v), {}, {
|
|
323
|
+
tableId: tableId,
|
|
324
|
+
tableUuid: tableUuid,
|
|
325
|
+
datasourceId: datasourceId
|
|
326
|
+
}));
|
|
315
327
|
store.setClosable(false);
|
|
316
328
|
} else {
|
|
317
329
|
setCurTable(tableUuid);
|
|
318
|
-
setCurColumn(value
|
|
330
|
+
setCurColumn(value);
|
|
319
331
|
setTimeout(function () {
|
|
320
332
|
return store.setClosable(true);
|
|
321
333
|
}, 300);
|
|
@@ -372,7 +384,11 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
372
384
|
})
|
|
373
385
|
})]
|
|
374
386
|
})
|
|
375
|
-
},
|
|
387
|
+
}, getColumnIdFirstKey(_objectSpread(_objectSpread({}, v), {}, {
|
|
388
|
+
tableId: tableId,
|
|
389
|
+
tableUuid: tableUuid,
|
|
390
|
+
datasourceId: datasourceId
|
|
391
|
+
})));
|
|
376
392
|
})]
|
|
377
393
|
})]
|
|
378
394
|
}, tableUuid || tableAlias);
|
|
@@ -11,7 +11,7 @@ import { SummarizeAlias } from '../../../store/helper';
|
|
|
11
11
|
import { __ } from '../../../locale';
|
|
12
12
|
import { NUMBER_GROUP, DATE_GROUP } from '../const';
|
|
13
13
|
import { useStore } from '../../../hooks/use-provider';
|
|
14
|
-
import { replaceTpl, mergeNameAlias } from '../../../utils/helper';
|
|
14
|
+
import { getColumnIdFirstKey, isSameColumnByIdFirst, replaceTpl, mergeNameAlias } from '../../../utils/helper';
|
|
15
15
|
import { SearchIcon, TableIcon, CircleIcon, LetterAaIcon, CalendarIcon, WellIcon, ForeignKeyIcon, UpArrowIcon2, DownArrowIcon2 } from '../../icons';
|
|
16
16
|
export var DATE_GROUP_MAP = new Map([['分', '分'], ['时', '时'], ['天', '天'], ['周', '周'], ['月', '月'], ['季度', '季度'], ['一小时内的分钟数', '一小时内的分钟数'], ['一天内的小时数', '一天内的小时数'], ['一周内的天数', '一周内的天数'], ['一月内的天数', '一月内的天数'], ['一年内的天数', '一年内的天数'], ['一年的星期数', '一年的星期数'], ['一年的月数', '一年的月数']]);
|
|
17
17
|
export var NUMBER_GROUP_MAP = new Map([['自动间隔', '自动分组'], ['10个刻度间隔', '10 刻度间隔'], ['间隔50', '50 刻度间隔'], ['间隔100', '100 刻度间隔'], ['无间隔', '']]);
|
|
@@ -67,9 +67,9 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
67
67
|
useEffect(function () {
|
|
68
68
|
setValue(_value);
|
|
69
69
|
}, [_value]);
|
|
70
|
-
var isActive = function isActive(
|
|
70
|
+
var isActive = function isActive(field) {
|
|
71
71
|
return value.filter(function (v) {
|
|
72
|
-
return v
|
|
72
|
+
return isSameColumnByIdFirst(v, field);
|
|
73
73
|
}).length > 0;
|
|
74
74
|
};
|
|
75
75
|
useEffect(function () {
|
|
@@ -102,7 +102,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
102
102
|
}
|
|
103
103
|
var changeValue = function changeValue(table, val) {
|
|
104
104
|
var isHas = value.filter(function (v) {
|
|
105
|
-
return v
|
|
105
|
+
return isSameColumnByIdFirst(v, val);
|
|
106
106
|
}).length > 0;
|
|
107
107
|
var _value = _toConsumableArray(value);
|
|
108
108
|
if (table.tableUuid != curTable.tableUuid) {
|
|
@@ -112,7 +112,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
112
112
|
_value.push(val);
|
|
113
113
|
} else {
|
|
114
114
|
_value = _value.filter(function (v) {
|
|
115
|
-
return v
|
|
115
|
+
return !isSameColumnByIdFirst(v, val);
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
setValue(_value);
|
|
@@ -223,7 +223,12 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
223
223
|
className: cx("Sqb-List-section"),
|
|
224
224
|
children: _jsx("div", {
|
|
225
225
|
className: cx("Sqb-List-item mx-2", {
|
|
226
|
-
active: isActive(v
|
|
226
|
+
active: isActive(_objectSpread(_objectSpread({}, v), {}, {
|
|
227
|
+
fieldId: fieldId || v.id,
|
|
228
|
+
tableId: tableId,
|
|
229
|
+
tableUuid: tableUuid,
|
|
230
|
+
datasourceId: datasourceId
|
|
231
|
+
}))
|
|
227
232
|
}),
|
|
228
233
|
onClick: function onClick() {
|
|
229
234
|
changeValue(tableItem, {
|
|
@@ -246,7 +251,11 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
246
251
|
})]
|
|
247
252
|
})
|
|
248
253
|
})
|
|
249
|
-
},
|
|
254
|
+
}, getColumnIdFirstKey(_objectSpread(_objectSpread({}, v), {}, {
|
|
255
|
+
tableId: tableId,
|
|
256
|
+
tableUuid: tableUuid,
|
|
257
|
+
datasourceId: datasourceId
|
|
258
|
+
})));
|
|
250
259
|
})]
|
|
251
260
|
})]
|
|
252
261
|
}, tableUuid || tableAlias);
|
|
@@ -6,7 +6,7 @@ import cx from 'classnames';
|
|
|
6
6
|
import cloneDeep from 'lodash/cloneDeep';
|
|
7
7
|
import { __ } from '../../../locale';
|
|
8
8
|
import { TableIcon, SearchIcon } from '../../icons';
|
|
9
|
-
import { mergeNameAlias } from '../../../utils/helper';
|
|
9
|
+
import { getTableIdFirstKey, isSameTableByIdFirst, mergeNameAlias } from '../../../utils/helper';
|
|
10
10
|
var PrevResult = 'Previous results';
|
|
11
11
|
var SelectPermissionTable = function SelectPermissionTable(_ref) {
|
|
12
12
|
var _ref$data = _ref.data,
|
|
@@ -60,7 +60,7 @@ var SelectPermissionTable = function SelectPermissionTable(_ref) {
|
|
|
60
60
|
className: cx("Sqb-List-section"),
|
|
61
61
|
children: _jsx("div", {
|
|
62
62
|
className: cx("Sqb-List-item mx-2", {
|
|
63
|
-
active: value
|
|
63
|
+
active: isSameTableByIdFirst(value, v)
|
|
64
64
|
}),
|
|
65
65
|
onClick: function onClick() {
|
|
66
66
|
onChange(v);
|
|
@@ -78,7 +78,7 @@ var SelectPermissionTable = function SelectPermissionTable(_ref) {
|
|
|
78
78
|
})]
|
|
79
79
|
})
|
|
80
80
|
})
|
|
81
|
-
}, v
|
|
81
|
+
}, getTableIdFirstKey(v));
|
|
82
82
|
})]
|
|
83
83
|
})
|
|
84
84
|
})
|