@nokecy/qc-ui 0.1.21 → 0.1.23

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.
@@ -199,7 +199,10 @@ var FormRender = function FormRender(props) {
199
199
  maxWidth: 200
200
200
  }
201
201
  }, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps),
202
- "x-decorator": 'FormItem'
202
+ "x-decorator": 'FormItem',
203
+ "x-decorator-props": {
204
+ wrapperWrap: true
205
+ }
203
206
  }; ///@ts-ignore
204
207
 
205
208
  gridSchema.properties[name] = filedSchema;
@@ -29,7 +29,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
29
29
 
30
30
  var getFilter = function getFilter(objectKey, value) {
31
31
  if (typeof value === 'string') {
32
- return "".concat(objectKey, " =* ").concat(value);
32
+ return value != "" ? "".concat(objectKey, " =* ").concat(value) : "";
33
33
  }
34
34
 
35
35
  if (typeof value === 'number') {
@@ -44,31 +44,34 @@ var getFilter = function getFilter(objectKey, value) {
44
44
  return "".concat(objectKey, " >= ").concat((0, _dayjs.default)(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat((0, _dayjs.default)(value[1]).add(1, 'days').format("YYYY-MM-DD"));
45
45
  }
46
46
 
47
- return getObjectFilter(value, objectKey);
47
+ var items = [];
48
+ getObjectFilter(value, objectKey, items);
49
+ return items.join(",");
48
50
  };
49
51
 
50
- var getObjectFilter = function getObjectFilter(obj, objKey) {
51
- var key = Object.keys(obj)[0];
52
- var value = obj[key];
53
- var objectKey = "".concat(objKey, ".").concat(key);
52
+ var getObjectFilter = function getObjectFilter(obj, objKey, items) {
53
+ Object.keys(obj).map(function (key) {
54
+ var value = obj[key];
55
+ var objectKey = "".concat(objKey, ".").concat(key);
54
56
 
55
- if (typeof value === 'number') {
56
- return "".concat(objectKey, " = ").concat(value);
57
- }
57
+ if (typeof value === 'number') {
58
+ items.push("".concat(objectKey, " = ").concat(value));
59
+ }
58
60
 
59
- if (typeof value === 'string') {
60
- return "".concat(objectKey, " =* ").concat(value);
61
- }
61
+ if (typeof value === 'string') {
62
+ value != "" && items.push("".concat(objectKey, " =* ").concat(value));
63
+ }
62
64
 
63
- if (typeof value === 'boolean') {
64
- return "".concat(objectKey, " = ").concat(value);
65
- }
65
+ if (typeof value === 'boolean') {
66
+ items.push("".concat(objectKey, " = ").concat(value));
67
+ }
66
68
 
67
- if (value instanceof Array) {
68
- return "".concat(objectKey, " >= ").concat((0, _dayjs.default)(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat((0, _dayjs.default)(value[1]).add(1, 'days').format("YYYY-MM-DD"));
69
- }
69
+ if (value instanceof Array) {
70
+ items.push("".concat(objectKey, " >= ").concat((0, _dayjs.default)(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat((0, _dayjs.default)(value[1]).add(1, 'days').format("YYYY-MM-DD")));
71
+ }
70
72
 
71
- return getObjectFilter(value, "".concat(objKey, ".").concat(key));
73
+ if (value instanceof Object) items.push(getObjectFilter(value, "".concat(objKey, ".").concat(key), items));
74
+ });
72
75
  };
73
76
 
74
77
  var convertFilterModel = function convertFilterModel(filterModel) {
@@ -165,6 +165,7 @@ var ArrayTable = (0, _react2.observer)(function (props) {
165
165
  var data = _ref3.data;
166
166
  return data._id;
167
167
  },
168
+ rowHeight: 50,
168
169
  pagination: false,
169
170
  columnDefs: columns,
170
171
  rowData: dataSource
@@ -178,7 +178,10 @@ var FormRender = function FormRender(props) {
178
178
  maxWidth: 200
179
179
  }
180
180
  }, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps),
181
- "x-decorator": 'FormItem'
181
+ "x-decorator": 'FormItem',
182
+ "x-decorator-props": {
183
+ wrapperWrap: true
184
+ }
182
185
  }; ///@ts-ignore
183
186
 
184
187
  gridSchema.properties[name] = filedSchema;
@@ -20,7 +20,7 @@ import dayjs from 'dayjs';
20
20
 
21
21
  var getFilter = function getFilter(objectKey, value) {
22
22
  if (typeof value === 'string') {
23
- return "".concat(objectKey, " =* ").concat(value);
23
+ return value != "" ? "".concat(objectKey, " =* ").concat(value) : "";
24
24
  }
25
25
 
26
26
  if (typeof value === 'number') {
@@ -35,31 +35,34 @@ var getFilter = function getFilter(objectKey, value) {
35
35
  return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
36
36
  }
37
37
 
38
- return getObjectFilter(value, objectKey);
38
+ var items = [];
39
+ getObjectFilter(value, objectKey, items);
40
+ return items.join(",");
39
41
  };
40
42
 
41
- var getObjectFilter = function getObjectFilter(obj, objKey) {
42
- var key = Object.keys(obj)[0];
43
- var value = obj[key];
44
- var objectKey = "".concat(objKey, ".").concat(key);
43
+ var getObjectFilter = function getObjectFilter(obj, objKey, items) {
44
+ Object.keys(obj).map(function (key) {
45
+ var value = obj[key];
46
+ var objectKey = "".concat(objKey, ".").concat(key);
45
47
 
46
- if (typeof value === 'number') {
47
- return "".concat(objectKey, " = ").concat(value);
48
- }
48
+ if (typeof value === 'number') {
49
+ items.push("".concat(objectKey, " = ").concat(value));
50
+ }
49
51
 
50
- if (typeof value === 'string') {
51
- return "".concat(objectKey, " =* ").concat(value);
52
- }
52
+ if (typeof value === 'string') {
53
+ value != "" && items.push("".concat(objectKey, " =* ").concat(value));
54
+ }
53
55
 
54
- if (typeof value === 'boolean') {
55
- return "".concat(objectKey, " = ").concat(value);
56
- }
56
+ if (typeof value === 'boolean') {
57
+ items.push("".concat(objectKey, " = ").concat(value));
58
+ }
57
59
 
58
- if (value instanceof Array) {
59
- return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
60
- }
60
+ if (value instanceof Array) {
61
+ items.push("".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD")));
62
+ }
61
63
 
62
- return getObjectFilter(value, "".concat(objKey, ".").concat(key));
64
+ if (value instanceof Object) items.push(getObjectFilter(value, "".concat(objKey, ".").concat(key), items));
65
+ });
63
66
  };
64
67
 
65
68
  var convertFilterModel = function convertFilterModel(filterModel) {
@@ -143,6 +143,7 @@ export var ArrayTable = observer(function (props) {
143
143
  var data = _ref3.data;
144
144
  return data._id;
145
145
  },
146
+ rowHeight: 50,
146
147
  pagination: false,
147
148
  columnDefs: columns,
148
149
  rowData: dataSource