@bit-sun/business-component 2.4.19 → 3.0.0-alpha.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.
- package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +3 -0
- package/dist/components/Business/BsLayouts/Components/ChooseStore/services.d.ts +1 -0
- package/dist/components/Business/BsLayouts/Components/RightContent/i18n.d.ts +9 -0
- package/dist/components/Business/BsLayouts/service.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -0
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +1 -0
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +1 -0
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -1
- package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -0
- package/dist/components/Solution/RuleComponent/services.d.ts +1 -1
- package/dist/index.esm.js +1563 -1070
- package/dist/index.js +1548 -1053
- package/dist/utils/request.d.ts +2 -0
- package/dist/utils/utils.d.ts +6 -0
- package/package.json +6 -4
- package/src/assets/arrow_top.svg +18 -0
- package/src/components/Business/AddSelectBusiness/index.tsx +38 -19
- package/src/components/Business/BsLayouts/Components/ChooseStore/index.less +0 -0
- package/src/components/Business/BsLayouts/Components/ChooseStore/index.tsx +193 -0
- package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +10 -0
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +7 -1
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +3 -3
- package/src/components/Business/BsLayouts/Components/RightContent/i18n.ts +9 -0
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +19 -2
- package/src/components/Business/BsLayouts/index.tsx +44 -34
- package/src/components/Business/BsLayouts/service.ts +2 -2
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -9
- package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +5 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +346 -175
- package/src/components/Business/BsSulaQueryTable/setting.tsx +125 -87
- package/src/components/Business/BsSulaQueryTable/utils.tsx +57 -34
- package/src/components/Business/CommonGuideWrapper/index.tsx +11 -2
- package/src/components/Business/JsonQueryTable/index.tsx +10 -12
- package/src/components/Business/SearchSelect/utils.ts +3 -3
- package/src/components/Business/columnSettingTable/columnSetting.tsx +10 -8
- package/src/components/Business/columnSettingTable/utils.tsx +29 -29
- package/src/components/Functional/AddSelect/helps.ts +4 -3
- package/src/components/Functional/AddSelect/index.tsx +79 -33
- package/src/components/Functional/BillEntry/index.tsx +3 -3
- package/src/components/Functional/DataImport/index.tsx +3 -3
- package/src/components/Functional/DataValidation/index.tsx +3 -3
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +10 -5
- package/src/components/Functional/QueryMutipleInput/index.tsx +2 -1
- package/src/components/Functional/SearchSelect/index.less +6 -0
- package/src/components/Functional/SearchSelect/index.tsx +152 -45
- package/src/components/Functional/TreeSearchSelect/index.tsx +24 -22
- package/src/components/Solution/RuleComponent/RenderCompItem.tsx +641 -0
- package/src/components/Solution/RuleComponent/index.js +7 -652
- package/src/components/Solution/RuleComponent/services.ts +2 -2
- package/src/plugin/TableColumnSetting/index.tsx +2 -2
- package/src/utils/request.ts +53 -0
- package/src/utils/utils.ts +37 -21
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import request from '@/utils/request';
|
|
2
2
|
|
|
3
3
|
// 查询规则对象属性thresholdList
|
|
4
4
|
export async function getRegularThresholdRange(params: any) {
|
|
5
|
-
return
|
|
5
|
+
return request({
|
|
6
6
|
url: `/basic/regularThresholdRange/getVals/${params.queryIdentify}`,
|
|
7
7
|
method: 'POST',
|
|
8
8
|
data: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Table, message, Checkbox, Modal, Input, Button, Tooltip } from 'antd';
|
|
4
|
-
import
|
|
4
|
+
import request from '@/utils/request';
|
|
5
5
|
// import { request } from 'umi';
|
|
6
6
|
import {
|
|
7
7
|
SortableContainer,
|
|
@@ -65,7 +65,7 @@ class TableColumnSetting extends React.Component<TableColumnSettingProps> {
|
|
|
65
65
|
fixed: item.fixed
|
|
66
66
|
}))
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
request({
|
|
69
69
|
url: handleRequestUrl('/user','/appConfig/saveUserOrder',appRequestConfig),
|
|
70
70
|
method:'POST',
|
|
71
71
|
data: {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import request from "umi-request";
|
|
3
|
+
|
|
4
|
+
const get = (url, params?: any) => {
|
|
5
|
+
return request.get(url, {
|
|
6
|
+
...params,
|
|
7
|
+
}).then(handleResponseData);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const post = (url, data?: any) => {
|
|
11
|
+
return request.post(url, {
|
|
12
|
+
data,
|
|
13
|
+
}).then(handleResponseData);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const patch = (url, data?: any) => {
|
|
17
|
+
return request.patch(url, {
|
|
18
|
+
data,
|
|
19
|
+
}).then(handleResponseData);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const put = (url, data?: any) => {
|
|
23
|
+
return request.put(url, {
|
|
24
|
+
data,
|
|
25
|
+
}).then(handleResponseData);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const deleteS = (url, data?: any) => {
|
|
29
|
+
return request.delete(url, {
|
|
30
|
+
data,
|
|
31
|
+
}).then(handleResponseData);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const requestUtil: any = ({ url, ...parms }: { url: string; parms: any }) => {
|
|
35
|
+
return request(url, parms).then(handleResponseData);
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleResponseData = async (response: any) => {
|
|
41
|
+
return Promise.resolve({
|
|
42
|
+
data: response,
|
|
43
|
+
status: response.status
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
requestUtil.get = get;
|
|
48
|
+
requestUtil.post = post;
|
|
49
|
+
requestUtil.patch = patch;
|
|
50
|
+
requestUtil.put = put;
|
|
51
|
+
requestUtil.delete = deleteS;
|
|
52
|
+
|
|
53
|
+
export default requestUtil;
|
package/src/utils/utils.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { formatMessage, history } from 'umi';
|
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
5
|
import ENUM from './enumConfig';
|
|
6
6
|
import {
|
|
7
|
+
authFn,
|
|
7
8
|
handleTextDouble,
|
|
8
9
|
handleTextLineFeed,
|
|
9
10
|
handleTextOverflow,
|
|
@@ -77,34 +78,28 @@ export const handleBssulaColumnsSpecialParams = (col: any) => {
|
|
|
77
78
|
if (col.timeRenderHour) {
|
|
78
79
|
col.render = ({ text }: any) =>
|
|
79
80
|
handleTooltipHours(text, col.timeRenderHour);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (col.timeRender) {
|
|
81
|
+
} else if (col.timeRender) {
|
|
82
|
+
// 处理不显示 时分秒的时间
|
|
83
83
|
col.render = ({ text }: any) => handleTooltip(text, col.timeRender);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
if (col.images) {
|
|
84
|
+
} else if (col.textOverflow) {
|
|
85
|
+
// 处理文字太长
|
|
86
|
+
col.render = ({ text }: any) => handleTextOverflow(text, col.width);
|
|
87
|
+
} else if (col.images) {
|
|
90
88
|
col.render = ({ text }: any) => tableColumnsImage(text);
|
|
91
|
-
}
|
|
92
|
-
if (col.double) {
|
|
89
|
+
} else if (col.double) {
|
|
93
90
|
col.render = ({ record }: any) =>
|
|
94
91
|
handleTextDouble(record[col.textOne], record[col.textTwo]);
|
|
95
|
-
}
|
|
96
|
-
if (col.lineFeed) {
|
|
92
|
+
} else if (col.lineFeed) {
|
|
97
93
|
col.render = ({ text }: any) => handleTextLineFeed(text);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 处理序号
|
|
101
|
-
if (col.indexNumber) {
|
|
94
|
+
} else if (col.indexNumber) {
|
|
95
|
+
// 处理序号
|
|
102
96
|
col.render = ({ index }: any) => index + 1;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (!col.render) {
|
|
97
|
+
} else if (col.isPermissionColumn && Array.isArray(col?.render)) {
|
|
98
|
+
col.render = col.render.filter((item) => authFn(item.code));
|
|
99
|
+
} else if (!col.render) {
|
|
100
|
+
// 没有值默认显示 - -
|
|
106
101
|
// col.render = ({ text }: any) => text || '- -';
|
|
107
|
-
col.render = ({ text }: any) => text
|
|
102
|
+
col.render = ({ text }: any) => text ?? '--';
|
|
108
103
|
}
|
|
109
104
|
};
|
|
110
105
|
/**
|
|
@@ -193,3 +188,24 @@ export const judgeIsEmpty = (value: any) => {
|
|
|
193
188
|
}
|
|
194
189
|
return false;
|
|
195
190
|
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 处理错误请求
|
|
194
|
+
* @param {*} response 返回结果
|
|
195
|
+
* @param {*} needBackError 是否需要将错误回传到页面单独处理
|
|
196
|
+
*/
|
|
197
|
+
export function handleError(response: object, needBackError?: boolean) {
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
if (
|
|
200
|
+
!response ||
|
|
201
|
+
(response.code ? response.code !== '000000' : response.status !== '0')
|
|
202
|
+
) {
|
|
203
|
+
if (response && !needBackError) {
|
|
204
|
+
// @ts-ignore
|
|
205
|
+
response.msg && message.error(response.msg);
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return true;
|
|
211
|
+
}
|