ns-base-module 2.0.15 → 2.0.17

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.
@@ -28,6 +28,7 @@ import Input from "../Entry/components/Input";
28
28
  import CopyCol from "../CopyCol";
29
29
  import { cloneDeep, find, flattenDeep, get, isFunction } from "lodash";
30
30
  import "../../style/components/FilterPopover.scss";
31
+ import errorMsg from "../utils/errorMsg";
31
32
  import { initLang } from "../utils/language";
32
33
  // import request from "../utils/request";
33
34
 
@@ -98,7 +99,7 @@ var Filter = function Filter(props) {
98
99
  var getDates = /*#__PURE__*/function () {
99
100
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
100
101
  var _searchEmnuValue$curr;
101
- var _list, checkValues, _label, _searchArgument, params, res, datas, _res, _res2, dataRow, arr, _datas;
102
+ var _list, checkValues, _label, _searchArgument, params, res, datas, _res, _res2, _res3, dataRow, arr, _datas;
102
103
  return _regeneratorRuntime().wrap(function _callee$(_context) {
103
104
  while (1) switch (_context.prev = _context.next) {
104
105
  case 0:
@@ -148,7 +149,7 @@ var Filter = function Filter(props) {
148
149
  res = {};
149
150
  datas = [];
150
151
  if (!isFunction(request)) {
151
- _context.next = 18;
152
+ _context.next = 19;
152
153
  break;
153
154
  }
154
155
  _context.next = 14;
@@ -161,12 +162,15 @@ var Filter = function Filter(props) {
161
162
  datas = get(res, "data.rows", []) || [];
162
163
  setTotal((_res = res) === null || _res === void 0 || (_res = _res.data) === null || _res === void 0 ? void 0 : _res.total);
163
164
  page.current.total = (_res2 = res) === null || _res2 === void 0 || (_res2 = _res2.data) === null || _res2 === void 0 ? void 0 : _res2.total;
164
- case 18:
165
+ if (((_res3 = res) === null || _res3 === void 0 ? void 0 : _res3.code) == 500) {
166
+ errorMsg(res);
167
+ }
168
+ case 19:
165
169
  if (!isFunction(newRequest)) {
166
- _context.next = 25;
170
+ _context.next = 26;
167
171
  break;
168
172
  }
169
- _context.next = 21;
173
+ _context.next = 22;
170
174
  return newRequest === null || newRequest === void 0 ? void 0 : newRequest({
171
175
  url: "/api/querier/menu",
172
176
  method: "POST",
@@ -174,12 +178,12 @@ var Filter = function Filter(props) {
174
178
  withFieldConfigs: false
175
179
  })
176
180
  });
177
- case 21:
181
+ case 22:
178
182
  dataRow = _context.sent;
179
183
  datas = get(dataRow, "rows", []) || [];
180
184
  setTotal(dataRow === null || dataRow === void 0 ? void 0 : dataRow.total);
181
185
  page.current.total = dataRow === null || dataRow === void 0 ? void 0 : dataRow.total;
182
- case 25:
186
+ case 26:
183
187
  arr = [];
184
188
  if (dataIndex) {
185
189
  datas.map(function (d) {
@@ -204,7 +208,7 @@ var Filter = function Filter(props) {
204
208
  setChecked([].concat(_toConsumableArray(checked), arr));
205
209
  }
206
210
  }
207
- case 31:
211
+ case 32:
208
212
  case "end":
209
213
  return _context.stop();
210
214
  }
@@ -122,7 +122,8 @@ var Index = function Index(props, ref) {
122
122
  type: "primary",
123
123
  onClick: handleView,
124
124
  style: {
125
- marginTop: 4
125
+ marginTop: 4,
126
+ height: "fit-content"
126
127
  },
127
128
  size: "small"
128
129
  }, initLang({
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  /* eslint-disable no-case-declarations */
18
18
  /* eslint-disable react/no-unknown-property */
19
19
  import { ArrowDownOutlined, ArrowUpOutlined, BarChartOutlined, CalculatorOutlined, CalendarOutlined, ClearOutlined, DeleteOutlined, DotChartOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined, LineChartOutlined, SortAscendingOutlined, SortDescendingOutlined, SwapOutlined, SwapRightOutlined } from "@ant-design/icons";
20
- import { Dropdown, Input, message, Popover, Space, Switch, Tooltip } from "antd";
20
+ import { Dropdown, Input, Popover, Space, Switch, Tooltip } from "antd";
21
21
  import { cloneDeep, find, get, isEmpty } from "lodash";
22
22
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
23
23
  import { ReactSortable } from "react-sortablejs";
@@ -106,18 +106,19 @@ var Index = function Index(props, ref) {
106
106
  useImperativeHandle(ref, function () {
107
107
  return {
108
108
  getQuotaDataStr: function getQuotaDataStr() {
109
- if (isEmpty(dimensionList)) {
110
- message.warning("维度不能为空");
111
- return "";
112
- } else if (isEmpty(quotaList)) {
113
- message.warning("指标不能为空");
114
- return "";
115
- } else if (valueRadio === "cross" || valueRadio === "trans") {
116
- if ((chartColumns === null || chartColumns === void 0 ? void 0 : chartColumns.length) === 1) {
117
- message.warning("列不能为空");
118
- return "";
119
- }
120
- }
109
+ // if (isEmpty(dimensionList)) {
110
+ // message.warning("维度不能为空");
111
+ // return "";
112
+ // } else if (isEmpty(quotaList)) {
113
+ // message.warning("指标不能为空");
114
+ // return "";
115
+ // } else if (valueRadio === "cross" || valueRadio === "trans") {
116
+ // if (chartColumns?.length === 1) {
117
+ // message.warning("列不能为空");
118
+ // return "";
119
+ // }
120
+ // }
121
+
121
122
  return JSON.stringify({
122
123
  list: list,
123
124
  numberList: numberList,
@@ -130,7 +130,7 @@ var updateTemplateFilds = function updateTemplateFilds(JsonPares, _columns) {
130
130
  frontEndFold: _findItem.frontEndFold
131
131
  });
132
132
  } else {
133
- JsonPares[r].checked = false;
133
+ JsonPares[r].checked = true;
134
134
  }
135
135
  };
136
136
  for (var r = 0, t = JsonPares.length; r < t; r++) {