@zgfe/business-lib 1.1.55-beta.0 → 1.1.55-beta.1

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.
@@ -15,6 +15,10 @@ var chartTypes = [{
15
15
  label: '汇总图',
16
16
  value: 'bar',
17
17
  icon: 'huizongtu'
18
+ }, {
19
+ label: '占比图',
20
+ value: 'pie',
21
+ icon: 'huizongtu'
18
22
  }, {
19
23
  label: '地图',
20
24
  value: 'map',
@@ -32,6 +36,10 @@ var chartTypes = [{
32
36
  label: '汇总图',
33
37
  value: 'bar',
34
38
  icon: 'huizongtu'
39
+ }, {
40
+ label: '占比图',
41
+ value: 'pie',
42
+ icon: 'huizongtu'
35
43
  }]
36
44
  }, {
37
45
  label: '分数',
@@ -43,6 +43,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
43
43
  router = _useContext.router,
44
44
  routes = _useContext.routes,
45
45
  isDemo = _useContext.isDemo;
46
+ var showTypes = ['line', 'bar', 'pie'];
46
47
  useEffect(function () {
47
48
  queryGroups();
48
49
  }, []);
@@ -166,6 +167,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
166
167
  }
167
168
  return /*#__PURE__*/React.createElement(BizDialog, {
168
169
  open: true,
170
+ width: "auto",
169
171
  title: props.type === 'edit' ? '修改当前看板指标' : '向看板添加指标',
170
172
  maskClosable: false,
171
173
  onCancel: props.onCancel,
@@ -248,7 +250,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
248
250
  }, function (_ref) {
249
251
  var getFieldValue = _ref.getFieldValue;
250
252
  var type = getFieldValue('chartType');
251
- return type === 'line' || type === 'bar' ? /*#__PURE__*/React.createElement(Form.Item, {
253
+ return showTypes.indexOf(type) > -1 ? /*#__PURE__*/React.createElement(Form.Item, {
252
254
  label: "\u663E\u793A",
253
255
  name: "showList",
254
256
  colon: false,
@@ -127,14 +127,17 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
127
127
  });
128
128
  };
129
129
  if (!((_props$value10 = props.value) === null || _props$value10 === void 0 ? void 0 : _props$value10.panelId)) {
130
- return /*#__PURE__*/React.createElement(React.Fragment, null, props.children);
130
+ return /*#__PURE__*/React.createElement("div", {
131
+ className: "".concat(classPrefix, "-content")
132
+ }, props.children);
131
133
  }
132
134
  return /*#__PURE__*/React.createElement(BizTargetFromPanelContext.Provider, {
133
135
  value: {
134
136
  handleSearch: setBtnOptions
135
137
  }
136
138
  }, /*#__PURE__*/React.createElement(Spin, {
137
- spinning: loading
139
+ spinning: loading,
140
+ wrapperClassName: classPrefix
138
141
  }, /*#__PURE__*/React.createElement(BizOptionLayout, {
139
142
  ref: titleRef,
140
143
  value: title,
@@ -145,7 +148,9 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
145
148
  onBack: function onBack() {
146
149
  return onClick(BizOptionTitleProps.OptionTypes.CANCEL);
147
150
  }
148
- }, props.children, showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
151
+ }, /*#__PURE__*/React.createElement("div", {
152
+ className: "".concat(classPrefix, "-content ").concat(classPrefix, "-content2")
153
+ }, props.children), showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
149
154
  defaultValue: {
150
155
  panel: {
151
156
  id: props.value.panelId
@@ -7,7 +7,7 @@ var BizOptionLayout = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
7
  var className = props.className;
8
8
  var classPrefix = 'biz-option-layout';
9
9
  return /*#__PURE__*/React.createElement("div", {
10
- className: "".concat(classPrefix, " ").concat(className)
10
+ className: "".concat(classPrefix, " ").concat(className || '')
11
11
  }, /*#__PURE__*/React.createElement("div", {
12
12
  className: "".concat(classPrefix, "-header")
13
13
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,6 +1,11 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
3
  .biz-layout-panel {
4
+ width: 100%;
5
+ height: 100%;
6
+ & > .ant-spin-container {
7
+ height: 100%;
8
+ }
4
9
  /*更多按钮*/
5
10
  &-btn-more {
6
11
  width: @height-base;
@@ -16,4 +21,14 @@
16
21
  .__default-hover();
17
22
  }
18
23
  }
24
+
25
+ &-content {
26
+ width: 100%;
27
+ height: 100%;
28
+ overflow: auto;
29
+ }
30
+ &-content2 {
31
+ height: calc(100% - 64px);
32
+ border-bottom: 1px solid @border-color-base;
33
+ }
19
34
  }
@@ -11,7 +11,6 @@
11
11
  width: 100%;
12
12
  height: 64px;
13
13
  padding: 0 16px;
14
- border-bottom: 1px solid @border-color-base;
15
14
 
16
15
  &-title {
17
16
  display: flex;
package/es/utils/ajax.js CHANGED
@@ -80,6 +80,7 @@ export function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
80
80
  msg = '账户未登录或登录已失效';
81
81
  } else if (new RegExp("".concat(ResponseStatus.noPermission)).test(apiResult.code)) {
82
82
  msg = '账户没有权限';
83
+ throw new Error(apiResult.msg);
83
84
  }
84
85
  if (!flag) {
85
86
  msg = apiResult.msg || msg;
@@ -88,6 +89,7 @@ export function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
88
89
  description: msg
89
90
  });
90
91
  message.error(msg);
92
+ throw new Error(msg);
91
93
  }
92
94
  return apiResult;
93
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.55-beta.0",
3
+ "version": "1.1.55-beta.1",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.12.0 || ^17.0.0",
61
61
  "yorkie": "^2.0.0"
62
62
  },
63
- "gitHead": "d43bbb8c72bb0da5995f873be7dc97bd009afbc3"
63
+ "gitHead": "0973fcf26dc2e3a4d0ddfa017f80348528cea00d"
64
64
  }