@ztocwst/rc-pro-materials 0.2.17 → 0.2.18

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.
@@ -118,26 +118,42 @@ var LinkRenderer = function LinkRenderer(props) {
118
118
  queryKeys = Object.keys(queryCache);
119
119
  if (queryKeys !== null && queryKeys !== void 0 && queryKeys.length) {
120
120
  queryKeys.forEach(function (k) {
121
- var _queryBind$find;
122
- // "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
123
- var key = (queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find = queryBind.find(function (item) {
121
+ // 查看是否有绑定关联关系
122
+ var queryBindFilter = queryBind === null || queryBind === void 0 ? void 0 : queryBind.filter(function (item) {
124
123
  return (item === null || item === void 0 ? void 0 : item.currentQueryKey) === k;
125
- })) === null || _queryBind$find === void 0 ? void 0 : _queryBind$find.sourceQueryKey) || k;
126
- // "值"(当前查询条件的"值")
127
- query[key] = queryCache[k];
124
+ });
125
+ // "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
126
+ if (queryBindFilter !== null && queryBindFilter !== void 0 && queryBindFilter.length) {
127
+ // 参数为时间时会出现多个绑定关系
128
+ queryBindFilter.forEach(function (item) {
129
+ var key = item.sourceQueryKey;
130
+ if (key) {
131
+ // "值"(当前查询条件的"值")
132
+ query[key] = queryCache[k];
133
+ }
134
+ });
135
+ } else {
136
+ // "值"(当前查询条件的"值")
137
+ query[k] = queryCache[k];
138
+ }
128
139
  });
129
140
  }
130
141
  recordKeys = Object.keys(record || {});
131
142
  if (recordKeys.length) {
132
143
  recordKeys.forEach(function (k) {
133
- var _queryBind$find2;
134
144
  // 查看是否有绑定关联关系
135
- var key = queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find2 = queryBind.find(function (item) {
145
+ var queryBindFilter = queryBind === null || queryBind === void 0 ? void 0 : queryBind.filter(function (item) {
136
146
  return (item === null || item === void 0 ? void 0 : item.parentDimKey) === k;
137
- })) === null || _queryBind$find2 === void 0 ? void 0 : _queryBind$find2.sourceQueryKey;
138
- if (key) {
139
- // "值"(有建立绑定关系 取上一级数据源的维度的"值")
140
- query[key] = record[k];
147
+ });
148
+ // 参数为时间时会出现多个绑定关系
149
+ if (queryBindFilter !== null && queryBindFilter !== void 0 && queryBindFilter.length) {
150
+ queryBindFilter.forEach(function (item) {
151
+ var key = item.sourceQueryKey;
152
+ if (key) {
153
+ // "值"(有建立绑定关系 取上一级数据源的维度的"值")
154
+ query[key] = record[k];
155
+ }
156
+ });
141
157
  }
142
158
  });
143
159
  }
@@ -123,26 +123,42 @@ var LinkRenderer = function LinkRenderer(props) {
123
123
  queryKeys = Object.keys(queryCache);
124
124
  if (queryKeys !== null && queryKeys !== void 0 && queryKeys.length) {
125
125
  queryKeys.forEach(function (k) {
126
- var _queryBind$find;
127
- // "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
128
- var key = (queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find = queryBind.find(function (item) {
126
+ // 查看是否有绑定关联关系
127
+ var queryBindFilter = queryBind === null || queryBind === void 0 ? void 0 : queryBind.filter(function (item) {
129
128
  return (item === null || item === void 0 ? void 0 : item.currentQueryKey) === k;
130
- })) === null || _queryBind$find === void 0 ? void 0 : _queryBind$find.sourceQueryKey) || k;
131
- // "值"(当前查询条件的"值")
132
- query[key] = queryCache[k];
129
+ });
130
+ // "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
131
+ if (queryBindFilter !== null && queryBindFilter !== void 0 && queryBindFilter.length) {
132
+ // 参数为时间时会出现多个绑定关系
133
+ queryBindFilter.forEach(function (item) {
134
+ var key = item.sourceQueryKey;
135
+ if (key) {
136
+ // "值"(当前查询条件的"值")
137
+ query[key] = queryCache[k];
138
+ }
139
+ });
140
+ } else {
141
+ // "值"(当前查询条件的"值")
142
+ query[k] = queryCache[k];
143
+ }
133
144
  });
134
145
  }
135
146
  recordKeys = Object.keys(record || {});
136
147
  if (recordKeys.length) {
137
148
  recordKeys.forEach(function (k) {
138
- var _queryBind$find2;
139
149
  // 查看是否有绑定关联关系
140
- var key = queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find2 = queryBind.find(function (item) {
150
+ var queryBindFilter = queryBind === null || queryBind === void 0 ? void 0 : queryBind.filter(function (item) {
141
151
  return (item === null || item === void 0 ? void 0 : item.parentDimKey) === k;
142
- })) === null || _queryBind$find2 === void 0 ? void 0 : _queryBind$find2.sourceQueryKey;
143
- if (key) {
144
- // "值"(有建立绑定关系 取上一级数据源的维度的"值")
145
- query[key] = record[k];
152
+ });
153
+ // 参数为时间时会出现多个绑定关系
154
+ if (queryBindFilter !== null && queryBindFilter !== void 0 && queryBindFilter.length) {
155
+ queryBindFilter.forEach(function (item) {
156
+ var key = item.sourceQueryKey;
157
+ if (key) {
158
+ // "值"(有建立绑定关系 取上一级数据源的维度的"值")
159
+ query[key] = record[k];
160
+ }
161
+ });
146
162
  }
147
163
  });
148
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztocwst/rc-pro-materials",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "@ztocwst/rc-pro-materials",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -86,9 +86,9 @@
86
86
  },
87
87
  "componentConfig": {
88
88
  "isComponentLibrary": true,
89
- "materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.17/build/lowcode/assets-prod.json"
89
+ "materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.18/build/lowcode/assets-prod.json"
90
90
  },
91
- "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.17/build/index.html",
91
+ "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.18/build/index.html",
92
92
  "publishConfig": {
93
93
  "registry": "https://registry.npmjs.org/",
94
94
  "access": "public"